Fixed Bug: #0212 - Vibration Chamber eat lava bucket

This commit is contained in:
AlgorithmX2
2014-03-21 20:25:12 -05:00
parent c4a7d5b480
commit 2751a1467f
+21 -4
View File
@@ -103,9 +103,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
{
if ( burnTime <= 0 )
{
eatFuel();
if ( burnTime > 0 )
if ( canEatFuel() )
{
try
{
@@ -208,6 +206,18 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
}
}
private boolean canEatFuel()
{
ItemStack is = getStackInSlot( 0 );
if ( is != null )
{
int newBurnTime = TileEntityFurnace.getItemBurnTime( is );
if ( newBurnTime > 0 && is.stackSize > 0 )
return true;
}
return false;
}
private void eatFuel()
{
ItemStack is = getStackInSlot( 0 );
@@ -220,7 +230,14 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
maxBurnTime = burnTime;
is.stackSize--;
if ( is.stackSize <= 0 )
setInventorySlotContents( 0, null );
{
ItemStack container = null;
if ( is.getItem().hasContainerItem( is ) )
container = is.getItem().getContainerItem( is );
setInventorySlotContents( 0, container );
}
else
setInventorySlotContents( 0, is );
}