diff --git a/src/main/java/tconstruct/tools/blocks/ToolStationBlock.java b/src/main/java/tconstruct/tools/blocks/ToolStationBlock.java index 45044bbbf35..59b63fa6184 100644 --- a/src/main/java/tconstruct/tools/blocks/ToolStationBlock.java +++ b/src/main/java/tconstruct/tools/blocks/ToolStationBlock.java @@ -212,17 +212,6 @@ public String getTextureDomain (int textureNameIndex) } /* Keep pattern chest inventory */ - @Override - public void breakBlock (World par1World, int x, int y, int z, Block blockID, int meta) - { - if (meta < 5 || meta > 9) - super.breakBlock(par1World, x, y, z, blockID, meta); - else - { - par1World.removeTileEntity(x, y, z); - } - } - @Override public boolean removedByPlayer (World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) { @@ -241,6 +230,11 @@ public boolean removedByPlayer (World world, EntityPlayer player, int x, int y, baseTag.setTag("Inventory", inventory); chest.setTagCompound(baseTag); + // remove content. This is necessary because otherwise the patterns would also spill into the world + // we don't want to prevent that since that's the intended behaviour for explosions. + for(int i = 0; i < logic.getSizeInventory(); i++) + logic.setInventorySlotContents(i, null); + //Spawn item if (!player.capabilities.isCreativeMode || player.isSneaking()) {