From d069bf77e3d4d9afd70b7bc168c41b61897104c7 Mon Sep 17 00:00:00 2001 From: gigabit101 Date: Wed, 9 Mar 2016 13:59:38 +0000 Subject: [PATCH] closes #377 --- .../java/techreborn/tiles/TileIronFurnace.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/techreborn/tiles/TileIronFurnace.java b/src/main/java/techreborn/tiles/TileIronFurnace.java index 3c4eed541..98101ccbf 100644 --- a/src/main/java/techreborn/tiles/TileIronFurnace.java +++ b/src/main/java/techreborn/tiles/TileIronFurnace.java @@ -70,6 +70,11 @@ public class TileIronFurnace extends TileMachineBase implements IInventory { { boolean burning = isBurning(); boolean updateInventory = false; + if (fuel > 0) + { + fuel--; + updateState(); + } if (fuel <= 0 && canSmelt()) { fuel = fuelGague = (int) (getItemBurnTime(getStackInSlot(fuelslot))); @@ -92,8 +97,6 @@ public class TileIronFurnace extends TileMachineBase implements IInventory { } if (isBurning() && canSmelt()) { - updateState(); - progress++; if (progress >= fuelScale) { @@ -105,15 +108,9 @@ public class TileIronFurnace extends TileMachineBase implements IInventory { else { progress = 0; - updateState(); - } - if (fuel > 0) - { - fuel--; } if (burning != isBurning()) { - this.active = true; updateInventory = true; } if (updateInventory) @@ -241,8 +238,8 @@ public class TileIronFurnace extends TileMachineBase implements IInventory { IBlockState blockState = worldObj.getBlockState(pos); if(blockState.getBlock() instanceof BlockMachineBase){ BlockMachineBase blockMachineBase = (BlockMachineBase) blockState.getBlock(); - if(blockState.getValue(BlockMachineBase.ACTIVE) != progress > 0) - blockMachineBase.setActive(progress > 0, worldObj, pos); + if(blockState.getValue(BlockMachineBase.ACTIVE) != fuel > 0) + blockMachineBase.setActive(fuel > 0, worldObj, pos); } }