diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index 2f457097..e6580a3b 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -9,6 +9,7 @@ package buildcraft.transport; +import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.TreeMap; @@ -457,6 +458,32 @@ public class BlockGenericPipe extends BlockContainer { super.breakBlock(world, x, y, z, par5, par6); } + @Override + public ArrayList getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) { + + if (CoreProxy.proxy.isRenderWorld(world)) + return null; + + ArrayList list = new ArrayList(); + + int count = quantityDropped(metadata, fortune, world.rand); + for (int i = 0; i < count; i++) { + Pipe pipe = getPipe(world, x, y, z); + + if (pipe == null) { + pipe = pipeRemoved.get(new BlockIndex(x, y, z)); + } + + if (pipe != null) { + if (pipe.itemID > 0) { + pipe.dropContents(); + list.add(new ItemStack(pipe.itemID, 1, damageDropped(metadata))); + } + } + } + return list; + } + @Override public String getTextureFile() { return DefaultProps.TEXTURE_BLOCKS;