if(event.entity instanceof EntityPlayer) {
EntityPlayer entityPlayer = (EntityPlayer) event.entity;
if(!entityPlayer.isSpectator() && event.renderer instanceof RenderPlayer && entityPlayer.inventory instanceof InventoryPlayerBattle) {
ItemStack offhand = ((InventoryPlayerBattle) entityPlayer.inventory).getCurrentOffhandWeapon();
if (offhand != null) {
<BUG>ModelPlayer renderer = ((RenderPlayer) event.renderer).getPlayerModel();
</BUG>
renderer.heldItemLeft = 1;
if (entityPlayer.getItemInUseCount() > 0 && entityPlayer.getItemInUse() == offhand) {
EnumAction enumaction = offhand.getItemUseAction();

if(event.entity instanceof EntityPlayer) {
EntityPlayer entityPlayer = (EntityPlayer) event.entity;
if(!entityPlayer.isSpectator() && event.renderer instanceof RenderPlayer && entityPlayer.inventory instanceof InventoryPlayerBattle) {
ItemStack offhand = ((InventoryPlayerBattle) entityPlayer.inventory).getCurrentOffhandWeapon();
if (offhand != null) {
ModelPlayer renderer = ((RenderPlayer) event.renderer).getMainModel();
renderer.heldItemLeft = 1;
if (entityPlayer.getItemInUseCount() > 0 && entityPlayer.getItemInUse() == offhand) {
EnumAction enumaction = offhand.getItemUseAction();
