@Override @SideOnly(Side.CLIENT) public void handleClientSide(EntityPlayer clientPlayer) { EntityPlayer player = (EntityPlayer) clientPlayer.worldObj.getEntityByID(playerEntityId); EntityMG mg = (EntityMG) clientPlayer.worldObj.getEntityByID(mgEntityId); if (mg != null && player != null) mg.mountGun(player, mounting); }
public PacketMGMount(EntityPlayer player, EntityMG mg, boolean mounting) { playerEntityId = player.getEntityId(); mgEntityId = mg.getEntityId(); this.mounting = mounting; }