ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.block)
heldItemRight = 3;
else if (enumaction == EnumAction.bow)
aimedBow = true;