Fix pick block function returning incorrect item ID when used on pipes

This commit is contained in:
Tinytimrob 2012-08-29 20:04:51 +00:00
parent bfff6e7a88
commit 9787df588e

View file

@ -13,6 +13,9 @@ import java.util.List;
import java.util.Random;
import java.util.TreeMap;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import buildcraft.BuildCraftTransport;
import buildcraft.api.tools.IToolWrench;
import buildcraft.api.transport.IPipe;
@ -246,6 +249,18 @@ public class BlockGenericPipe extends BlockContainer {
return 0;
}
@SideOnly(Side.CLIENT)
@Override
public int idPicked(World world, int i, int j, int k)
{
Pipe pipe = getPipe(world, i, j, k);
if (pipe == null)
return 0;
else
return pipe.itemID;
}
/** Wrappers *************************************************************/
@Override