Fix advanced furnaces secretly invalidating themselves without telling anyone

This commit is contained in:
Ben Spiers 2013-10-13 11:54:01 +01:00
parent 8488324dda
commit 7a65a88735

View file

@ -95,6 +95,8 @@ public class TileEntityAdvancedFurnace extends TileEntityFurnace implements IEle
if (doBlockStateUpdate != this.furnaceBurnTime > 0)
{
BlockFurnace.updateFurnaceBlockState(this.furnaceBurnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
if (this.isInvalid())
this.refreshConductors();
}
}
}
@ -121,6 +123,19 @@ public class TileEntityAdvancedFurnace extends TileEntityFurnace implements IEle
this.doProduce = false;
}
public void refreshConductors()
{
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)
{
TileEntity tileEntity = new Vector3(this).modifyPositionFromSide(direction).getTileEntity(this.worldObj);
if (tileEntity instanceof IConductor)
{
((IConductor)tileEntity).refresh();
}
}
}
/**
* Produces UE power towards a specific direction.
*