From 3f41e26ece2f1d440d21bedfa96f9ef0ec93161d Mon Sep 17 00:00:00 2001 From: Modmuss50 Date: Wed, 18 Nov 2015 17:02:07 +0000 Subject: [PATCH] Fixes some issues with the fustion reactor. --- src/main/java/techreborn/client/gui/GuiFusionReactor.java | 3 ++- src/main/java/techreborn/tiles/TileAesu.java | 2 ++ .../tiles/fusionReactor/TileEntityFusionController.java | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/techreborn/client/gui/GuiFusionReactor.java b/src/main/java/techreborn/client/gui/GuiFusionReactor.java index 0aa1d7c3b..0ac6b0f13 100644 --- a/src/main/java/techreborn/client/gui/GuiFusionReactor.java +++ b/src/main/java/techreborn/client/gui/GuiFusionReactor.java @@ -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); } diff --git a/src/main/java/techreborn/tiles/TileAesu.java b/src/main/java/techreborn/tiles/TileAesu.java index 0ffed7910..91f7d159e 100644 --- a/src/main/java/techreborn/tiles/TileAesu.java +++ b/src/main/java/techreborn/tiles/TileAesu.java @@ -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); } diff --git a/src/main/java/techreborn/tiles/fusionReactor/TileEntityFusionController.java b/src/main/java/techreborn/tiles/fusionReactor/TileEntityFusionController.java index 53641b1a9..7cbd74d7c 100644 --- a/src/main/java/techreborn/tiles/fusionReactor/TileEntityFusionController.java +++ b/src/main/java/techreborn/tiles/fusionReactor/TileEntityFusionController.java @@ -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 {