Fixes some issues with the fustion reactor.
This commit is contained in:
parent
885a6ad76d
commit
3f41e26ece
3 changed files with 7 additions and 4 deletions
|
@ -39,7 +39,8 @@ public class GuiFusionReactor extends GuiContainer {
|
|||
|
||||
this.fontRendererObj.drawString("EU: " + containerFusionReactor.energy, 11, 8, 16448255);
|
||||
this.fontRendererObj.drawString("Coils: " + (containerFusionReactor.coilStatus == 1 ? "Yes" : "No"), 11, 16, 16448255);
|
||||
this.fontRendererObj.drawString("Start EU: " + percentage(containerFusionReactor.neededEU, containerFusionReactor.energy) + "%", 11, 24, 16448255);
|
||||
if(containerFusionReactor.neededEU > 1 && containerFusionReactor.tickTime < 1)
|
||||
this.fontRendererObj.drawString("Start EU: " + percentage(containerFusionReactor.neededEU, containerFusionReactor.energy) + "%", 11, 24, 16448255);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ public class TileAesu extends TilePowerAcceptor implements IWrenchable {
|
|||
super.writeToNBTWithoutCoords(tagCompound);
|
||||
tagCompound.setDouble("euChange", euChange);
|
||||
tagCompound.setDouble("euLastTick", euLastTick);
|
||||
tagCompound.setInteger("output", OUTPUT);
|
||||
inventory.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
|
@ -131,6 +132,7 @@ public class TileAesu extends TilePowerAcceptor implements IWrenchable {
|
|||
super.readFromNBTWithoutCoords(nbttagcompound);
|
||||
this.euChange = nbttagcompound.getDouble("euChange");
|
||||
this.euLastTick = nbttagcompound.getDouble("euLastTick");
|
||||
this.OUTPUT = nbttagcompound.getInteger("output");
|
||||
inventory.readFromNBT(nbttagcompound);
|
||||
}
|
||||
|
||||
|
|
|
@ -213,7 +213,6 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
|
|||
if (currentRecipe == null) {
|
||||
if (inventory.hasChanged || crafingTickTime != 0) {
|
||||
for (FusionReactorRecipe reactorRecipe : FusionReactorRecipeHelper.reactorRecipes) {
|
||||
System.out.println(getStackInSlot(topStackSlot) + "@" + reactorRecipe.getTopInput());
|
||||
if (ItemUtils.isItemEqual(getStackInSlot(topStackSlot), reactorRecipe.getTopInput(), true, true, true)) {
|
||||
if (reactorRecipe.getBottomInput() != null) {
|
||||
if (ItemUtils.isItemEqual(getStackInSlot(bottomStackSlot), reactorRecipe.getBottomInput(), true, true, true) == false) {
|
||||
|
@ -239,11 +238,12 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
|
|||
if (inventory.hasChanged) {
|
||||
if (!validateRecipe()) {
|
||||
resetCrafter();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!hasStartedCrafting) {
|
||||
if (canUseEnergy(currentRecipe.getStartEU())) {
|
||||
setEnergy(getEnergy() - currentRecipe.getStartEU());
|
||||
if (canUseEnergy(currentRecipe.getStartEU() + 64)) {
|
||||
useEnergy(currentRecipe.getStartEU());
|
||||
hasStartedCrafting = true;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue