Okay, so I have 6 different types of bookcase, each with their own texture and metadata, but whenever I pick block on any of them, I always get the one with a metadata of 0.
I have tried these two methods:
public ItemStack onPickBlock(Block block, int i, int meta) {
if(meta == 0) {
return new ItemStack(AdvAes.blockBookshelves, 0, 3);
} else return new ItemStack(AdvAes.blockBookshelves, 0, 5);
}
public ItemStack getPickBlock(Block block, int i, int meta) {
if(meta == 0) {
return new ItemStack(AdvAes.blockBookshelves, 0, 3);
} else return new ItemStack(AdvAes.blockBookshelves, 0, 5);
}
I intentionally messed up the metadata numbers just for testing.
However with both of these , where I should not be given the metadata of 0 at all, I still get the bookshelf with 0.
EDIT: I have also now tried
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
Item item = getItem(world, x, y , z);
Block block = Block.getBlockFromItem(item);
return new ItemStack(item, 1, block.getDamageValue(world, x, y, z));
}
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
Item item = getItem(world, x, y , z);
if(item == null) {
return null;
}
Block block = item instanceof ItemBlock && !isFlowerPot() ? Block.getBlockFromItem(item) : this;
return new ItemStack(item, 1, block.getDamageValue(world, x, y, z));
}