diff --git a/src/main/java/biomesoplenty/common/items/ItemBOPFood.java b/src/main/java/biomesoplenty/common/items/ItemBOPFood.java index 243c923e5..aea812bb2 100644 --- a/src/main/java/biomesoplenty/common/items/ItemBOPFood.java +++ b/src/main/java/biomesoplenty/common/items/ItemBOPFood.java @@ -61,16 +61,20 @@ public class ItemBOPFood extends ItemFood public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitVecX, float hitVecY, float hitVecZ) { + if (stack.getItemDamage() != 2) + { + return false; + } if (side != 1) { return false; } else if (player.canPlayerEdit(x, y, z, side, stack) && player.canPlayerEdit(x, y + 1, z, side, stack)) { - if (((BlockBOPPlant)BOPCBlocks.plants).isValidPosition(world, x, y+1, z, 11) && world.isAirBlock(x, y + 1, z)) + if (((BlockBOPPlant)BOPCBlocks.plants).isValidPosition(world, x, y + 1, z, 11) && world.isAirBlock(x, y + 1, z)) { world.setBlock(x, y + 1, z, BOPCBlocks.plants); - world.setBlockMetadataWithNotify(x, y+1, z, 11, 2); + world.setBlockMetadataWithNotify(x, y + 1, z, 11, 2); --stack.stackSize; return true; }