Fixed stupid errors and improved readability

This commit is contained in:
SoundLogic 2014-08-13 03:15:01 -05:00
parent c0e44c8333
commit a3060ae8e0

View file

@ -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;
}