This commit is contained in:
Flow86 2013-03-12 09:53:10 +01:00
parent 69ac580b3f
commit 3b082dfddb

View file

@ -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<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) {
if (CoreProxy.proxy.isRenderWorld(world))
return null;
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
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;