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.Random;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Side;
|
||||||
|
import cpw.mods.fml.common.asm.SideOnly;
|
||||||
|
|
||||||
import buildcraft.BuildCraftTransport;
|
import buildcraft.BuildCraftTransport;
|
||||||
import buildcraft.api.tools.IToolWrench;
|
import buildcraft.api.tools.IToolWrench;
|
||||||
import buildcraft.api.transport.IPipe;
|
import buildcraft.api.transport.IPipe;
|
||||||
|
@ -245,6 +248,18 @@ public class BlockGenericPipe extends BlockContainer {
|
||||||
// Returns 0 to be safe - the id does not depend on the meta
|
// Returns 0 to be safe - the id does not depend on the meta
|
||||||
return 0;
|
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 *************************************************************/
|
/** Wrappers *************************************************************/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue