Fixes some issues with the fustion reactor.

This commit is contained in:
Modmuss50 2015-11-18 17:02:07 +00:00
parent 885a6ad76d
commit 3f41e26ece
3 changed files with 7 additions and 4 deletions

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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 {