closes #377
This commit is contained in:
parent
e1cd18ad7d
commit
d069bf77e3
1 changed files with 7 additions and 10 deletions
|
@ -70,6 +70,11 @@ public class TileIronFurnace extends TileMachineBase implements IInventory {
|
||||||
{
|
{
|
||||||
boolean burning = isBurning();
|
boolean burning = isBurning();
|
||||||
boolean updateInventory = false;
|
boolean updateInventory = false;
|
||||||
|
if (fuel > 0)
|
||||||
|
{
|
||||||
|
fuel--;
|
||||||
|
updateState();
|
||||||
|
}
|
||||||
if (fuel <= 0 && canSmelt())
|
if (fuel <= 0 && canSmelt())
|
||||||
{
|
{
|
||||||
fuel = fuelGague = (int) (getItemBurnTime(getStackInSlot(fuelslot)));
|
fuel = fuelGague = (int) (getItemBurnTime(getStackInSlot(fuelslot)));
|
||||||
|
@ -92,8 +97,6 @@ public class TileIronFurnace extends TileMachineBase implements IInventory {
|
||||||
}
|
}
|
||||||
if (isBurning() && canSmelt())
|
if (isBurning() && canSmelt())
|
||||||
{
|
{
|
||||||
updateState();
|
|
||||||
|
|
||||||
progress++;
|
progress++;
|
||||||
if (progress >= fuelScale)
|
if (progress >= fuelScale)
|
||||||
{
|
{
|
||||||
|
@ -105,15 +108,9 @@ public class TileIronFurnace extends TileMachineBase implements IInventory {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
progress = 0;
|
progress = 0;
|
||||||
updateState();
|
|
||||||
}
|
|
||||||
if (fuel > 0)
|
|
||||||
{
|
|
||||||
fuel--;
|
|
||||||
}
|
}
|
||||||
if (burning != isBurning())
|
if (burning != isBurning())
|
||||||
{
|
{
|
||||||
this.active = true;
|
|
||||||
updateInventory = true;
|
updateInventory = true;
|
||||||
}
|
}
|
||||||
if (updateInventory)
|
if (updateInventory)
|
||||||
|
@ -241,8 +238,8 @@ public class TileIronFurnace extends TileMachineBase implements IInventory {
|
||||||
IBlockState blockState = worldObj.getBlockState(pos);
|
IBlockState blockState = worldObj.getBlockState(pos);
|
||||||
if(blockState.getBlock() instanceof BlockMachineBase){
|
if(blockState.getBlock() instanceof BlockMachineBase){
|
||||||
BlockMachineBase blockMachineBase = (BlockMachineBase) blockState.getBlock();
|
BlockMachineBase blockMachineBase = (BlockMachineBase) blockState.getBlock();
|
||||||
if(blockState.getValue(BlockMachineBase.ACTIVE) != progress > 0)
|
if(blockState.getValue(BlockMachineBase.ACTIVE) != fuel > 0)
|
||||||
blockMachineBase.setActive(progress > 0, worldObj, pos);
|
blockMachineBase.setActive(fuel > 0, worldObj, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue