From 2751a1467fc13a354c595bde371e46d67235836a Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Fri, 21 Mar 2014 20:25:12 -0500 Subject: [PATCH] Fixed Bug: #0212 - Vibration Chamber eat lava bucket --- tile/misc/TileVibrationChamber.java | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/tile/misc/TileVibrationChamber.java b/tile/misc/TileVibrationChamber.java index d4dfdd3bf..76131c292 100644 --- a/tile/misc/TileVibrationChamber.java +++ b/tile/misc/TileVibrationChamber.java @@ -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 ); }