From 0c74b0fe0f4e3f4d3b4c72ff97068fff0a0ad30c Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 20 Aug 2014 12:07:25 -0500 Subject: [PATCH] Interfaces functioning in autonomous mode now eject items left over, such as buckets. --- tile/crafting/TileMolecularAssembler.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tile/crafting/TileMolecularAssembler.java b/tile/crafting/TileMolecularAssembler.java index 29e213966..1f32fe7be 100644 --- a/tile/crafting/TileMolecularAssembler.java +++ b/tile/crafting/TileMolecularAssembler.java @@ -386,6 +386,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn pushOut( inv.getStackInSlot( 9 ) ); ejectHeldItems(); updateSleepyness(); + progress = 0; return isAwake ? TickRateModulation.IDLE : TickRateModulation.SLEEP; } @@ -398,6 +399,9 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn if ( reboot ) TicksSinceLastCall = 1; + if ( ! isAwake ) + return TickRateModulation.SLEEP; + reboot = false; int speed = 10; switch (upgrades.getInstalledUpgrades( Upgrades.SPEED )) @@ -468,17 +472,20 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn private void ejectHeldItems() { - if ( myPlan == null && inv.getStackInSlot( 9 ) == null ) + if ( inv.getStackInSlot( 9 ) == null ) { for (int x = 0; x < 9; x++) { ItemStack is = inv.getStackInSlot( x ); if ( is != null ) { - inv.setInventorySlotContents( 9, is ); - inv.setInventorySlotContents( x, null ); - markDirty(); - return; + if ( myPlan == null || ! myPlan.isValidItemForSlot( x, is, worldObj ) ) + { + inv.setInventorySlotContents( 9, is ); + inv.setInventorySlotContents( x, null ); + markDirty(); + return; + } } } }