Fix pick block function returning incorrect item ID when used on pipes
This commit is contained in:
parent
bfff6e7a88
commit
9787df588e
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue