From 613a072a3b8072a98f6e5a65e84d2e536032d2d9 Mon Sep 17 00:00:00 2001 From: Robert Seifert Date: Mon, 29 Apr 2013 12:37:40 -0400 Subject: [PATCH] Fixed Crate item import into crate block My check to prevent crates from entering crates also keep them from imputing into each other. --- .../assemblyline/common/block/BlockCrate.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/minecraft/assemblyline/common/block/BlockCrate.java b/src/minecraft/assemblyline/common/block/BlockCrate.java index b20fa8726..1096424ef 100644 --- a/src/minecraft/assemblyline/common/block/BlockCrate.java +++ b/src/minecraft/assemblyline/common/block/BlockCrate.java @@ -89,8 +89,8 @@ public class BlockCrate extends BlockALMachine @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) { - if (super.onBlockActivated(world, x, y, z, entityPlayer, side, hitX, hitY, hitZ)) - return true; + if (super.onBlockActivated(world, x, y, z, entityPlayer, side, hitX, hitY, hitZ)){ + return true;} if (!world.isRemote) { @@ -101,12 +101,7 @@ public class BlockCrate extends BlockALMachine /** * Make double clicking input all stacks. */ - boolean allMode = false; - - if (world.getWorldTime() - tileEntity.prevClickTime < 10) - { - allMode = true; - } + boolean allMode = (world.getWorldTime() - tileEntity.prevClickTime < 10); tileEntity.prevClickTime = world.getWorldTime(); ItemStack current = entityPlayer.inventory.getCurrentItem(); @@ -114,7 +109,7 @@ public class BlockCrate extends BlockALMachine // Add items if (side == 1 || (side > 1 && hitY > 0.5) || !entityPlayer.capabilities.isCreativeMode) { - if (current != null && current.getMaxStackSize() > 1 && current.itemID != this.blockID) + if (current != null && (current.getMaxStackSize() > 1 || current.itemID == this.blockID)) { this.tryInsert(tileEntity, entityPlayer, allMode); }