From 3b082dfddb60f56afeb4066b86cd2e883733751e Mon Sep 17 00:00:00 2001 From: Flow86 Date: Tue, 12 Mar 2013 09:53:10 +0100 Subject: [PATCH] fixes #648 --- .../transport/BlockGenericPipe.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) 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;