Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magic fix #1272

Merged
merged 6 commits into from
Nov 25, 2017
Merged

Magic fix #1272

merged 6 commits into from
Nov 25, 2017

Conversation

jaskarth
Copy link
Collaborator

@jaskarth jaskarth commented Nov 4, 2017

Not really a fix but rebalancing to make it more effective on small nodes.
The reason why it was not generating in the old version was because the energy from vis divisor was set way too high, meaning a node with 60 or so of each aspect was necessary to generate 32 eu per tick. Also, the energy will scale better now, instead of a huge amount of power given when you get more than 4 of each aspect on a node, a small boost will be given to each aspect. This should make it more viable for practical use.

@@ -38,11 +39,13 @@
public static boolean sAllowMultipleEggs = true;
public static GT_MetaTileEntity_MagicalEnergyAbsorber mActiveSiphon = null;
public static int sEnergyPerEnderCrystal = 32;
public static int sEnergyFromVis = 12800;
public static int sEnergyFromVis = 512; //really? this high? no wonder no eu was generating... (it was 12800 at the time)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think leaving comments like this is a good thing. If you want something to be changed, just change it. Reasoning behind this put into PR description.

public static int sDragonEggEnergyPerTick = 128;
public static boolean isThaumcraftLoaded;
public static boolean tLameMode = false; // if you use this... lame.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What even is this variable? How do you set it?

public int mEfficiency;
public EntityEnderCrystal mTargetedCrystal;
//public static int[] VoltageOut = {32, 128,512,2048}; // Because what the fuck even is this code.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh I'm really sorry I left those things in when I was testing and forgot to remove them. I will fix those as soon as possible.

@jaskarth
Copy link
Collaborator Author

jaskarth commented Nov 4, 2017

I'm really sorry again, I will clean up my code better before pull requesting next time.

World tmpWorld = this.getBaseMetaTileEntity().getWorld();
int tmpX = this.getBaseMetaTileEntity().getXCoord();
int tmpY = this.getBaseMetaTileEntity().getYCoord();
int tmpY = this.getBaseMetaTileEntity().getYCoord() + 2; //Add 2 because +1 is the node stabiliser and +2 is the node itself
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These coordinates are of the energy absorber. We have no idea where the node or any thaumcraft parts are. We only tell the TC API that here is something that wants to consume Vis and it pushes it there if in range.

if (water > 4)
mult += 15;
visEU = (visEU * mult) / 100;
getBaseMetaTileEntity().increaseStoredEnergyUnits(Math.min(maxEUOutput(), visEU * getEfficiency() / this.sEnergyFromVis), false);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the value returned from "getEfficency()" is 10000 for 100% i somehow get the feeling that the changed EnergyFromVis value does not account for that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't the getEfficiency() function return the efficiency of that block? Such as 90% for LV, 80% for MV, 70% for HV, and so on? I was trying my best to keep the old code's functionality so I just left it there like that

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at it again is seems you are right. was working too much with the multiblocks lately to remember that single blocks work differently...

@jaskarth
Copy link
Collaborator Author

jaskarth commented Nov 5, 2017

I wasn't aware the TC API worked like that, the latest commit should fix that.

@jaskarth jaskarth closed this Nov 5, 2017
@jaskarth jaskarth deleted the Magic-Fix branch November 5, 2017 19:44
@jaskarth jaskarth restored the Magic-Fix branch November 5, 2017 19:51
@jaskarth jaskarth reopened this Nov 5, 2017
Copy link
Collaborator

@draknyte1 draknyte1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless Import.

@@ -1,5 +1,6 @@
package gregtech.common.tileentities.generators;

import cpw.mods.fml.common.FMLLog;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea how that got there

@Blood-Asp Blood-Asp merged commit af7e1d8 into Blood-Asp:unstable Nov 25, 2017
Dream-Master referenced this pull request in GTNewHorizons/GT5-Unofficial Dec 2, 2017
Commit: af7e1d8 [af7e1d8]

Merge pull request #1272 from SuperCoder7979/Magic-Fix

Magic fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants