// Path: src/main/java/com/darkona/adventurebackpack/proxy/ClientProxy.java
// public class ClientProxy implements IProxy
// {
// 
//     public static RendererItemAdventureBackpack rendererItemAdventureBackpack;
//     public static RendererItemAdventureHat rendererItemAdventureHat;
//     public static RendererHose rendererHose;
//     public static RendererWearableEquipped rendererWearableEquipped;
//     public static RenderHandler renderHandler;
//     public static RendererInflatableBoat renderInflatableBoat;
//     public static RenderRideableSpider renderRideableSpider;
//     public static RendererItemClockworkCrossbow renderCrossbow;
//     public static ModelSteamJetpack modelSteamJetpack = new ModelSteamJetpack();
//     public static ModelBackpackArmor modelAdventureBackpack = new ModelBackpackArmor();
//     public static ModelCopterPack modelCopterPack = new ModelCopterPack();
// 
// 
//     public void init()
//     {
//         initRenderers();
//         registerKeybindings();
//         MinecraftForge.EVENT_BUS.register(new GuiOverlay(Minecraft.getMinecraft()));
//     }
// 
//     public void initNetwork()
//     {
// 
//     }
// 
//     @Override
//     public void joinPlayer(EntityPlayer player)
//     {
//         LogHelper.info("Joined Player in client");
//     }
// 
//     @Override
//     public void synchronizePlayer(int id, NBTTagCompound properties)
//     {
//         Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(id);
//         if(Utils.notNullAndInstanceOf(entity, EntityPlayer.class)&& properties != null)
//         {
//             EntityPlayer player = (EntityPlayer)entity;
//             if(BackpackProperty.get(player) == null) BackpackProperty.register(player);
//             BackpackProperty.get(player).loadNBTData(properties);
//         }
//     }
// 
//     public void initRenderers()
//     {
//         renderHandler = new RenderHandler();
//         MinecraftForge.EVENT_BUS.register(renderHandler);
//         rendererWearableEquipped = new RendererWearableEquipped();
// 
//         rendererItemAdventureBackpack = new RendererItemAdventureBackpack();
//         MinecraftForgeClient.registerItemRenderer(ModItems.adventureBackpack, rendererItemAdventureBackpack);
//         MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.blockBackpack), rendererItemAdventureBackpack);
//         ClientRegistry.bindTileEntitySpecialRenderer(TileAdventureBackpack.class, new RendererAdventureBackpackBlock());
// 
//         rendererItemAdventureHat = new RendererItemAdventureHat();
//         MinecraftForgeClient.registerItemRenderer(ModItems.adventureHat, rendererItemAdventureHat);
// 
//         if(!ConfigHandler.TANKS_OVERLAY)
//         {
//             rendererHose = new RendererHose();
//             MinecraftForgeClient.registerItemRenderer(ModItems.hose, rendererHose);
//         }
// 
//         ClientRegistry.bindTileEntitySpecialRenderer(TileCampfire.class, new RendererCampFire());
// 
//         renderInflatableBoat = new RendererInflatableBoat();
//         RenderingRegistry.registerEntityRenderingHandler(EntityInflatableBoat.class, renderInflatableBoat);
//         renderRideableSpider = new RenderRideableSpider();
//         RenderingRegistry.registerEntityRenderingHandler(EntityFriendlySpider.class, renderRideableSpider);
// 
//         renderCrossbow = new RendererItemClockworkCrossbow();
//         MinecraftForgeClient.registerItemRenderer(ModItems.cwxbow, renderCrossbow);
//     }
// 
//     public void registerKeybindings()
//     {
//         ClientRegistry.registerKeyBinding(Keybindings.openBackpack);
//         ClientRegistry.registerKeyBinding(Keybindings.toggleHose);
//         FMLCommonHandler.instance().bus().register(new KeybindHandler());
//     }
// 
// }


import com.darkona.adventurebackpack.proxy.ClientProxy;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.client.event.RenderPlayerEvent;
package com.darkona.adventurebackpack.handlers;


/**
 * Created on 25/12/2014
 *
 * @author Darkona
 */
public class RenderHandler
{
    @SubscribeEvent
    @SideOnly(Side.CLIENT)
    public void playerSpecialsRendering(RenderPlayerEvent.Specials.Pre event)
    {

        float rotationY = event.renderer.modelBipedMain.bipedBody.rotateAngleY;
        float rotationX = event.renderer.modelBipedMain.bipedBody.rotateAngleX;
        float rotationZ = event.renderer.modelBipedMain.bipedBody.rotateAngleZ;

        double x = event.entity.posX;
        double y = event.entity.posY;
        double z = event.entity.posZ;

        float pitch = event.entity.rotationPitch;
        float yaw = event.entity.rotationYaw;
// Path: src/main/java/com/darkona/adventurebackpack/proxy/ClientProxy.java
// public class ClientProxy implements IProxy
// {
// 
//     public static RendererItemAdventureBackpack rendererItemAdventureBackpack;
//     public static RendererItemAdventureHat rendererItemAdventureHat;
//     public static RendererHose rendererHose;
//     public static RendererWearableEquipped rendererWearableEquipped;
//     public static RenderHandler renderHandler;
//     public static RendererInflatableBoat renderInflatableBoat;
//     public static RenderRideableSpider renderRideableSpider;
//     public static RendererItemClockworkCrossbow renderCrossbow;
//     public static ModelSteamJetpack modelSteamJetpack = new ModelSteamJetpack();
//     public static ModelBackpackArmor modelAdventureBackpack = new ModelBackpackArmor();
//     public static ModelCopterPack modelCopterPack = new ModelCopterPack();
// 
// 
//     public void init()
//     {
//         initRenderers();
//         registerKeybindings();
//         MinecraftForge.EVENT_BUS.register(new GuiOverlay(Minecraft.getMinecraft()));
//     }
// 
//     public void initNetwork()
//     {
// 
//     }
// 
//     @Override
//     public void joinPlayer(EntityPlayer player)
//     {
//         LogHelper.info("Joined Player in client");
//     }
// 
//     @Override
//     public void synchronizePlayer(int id, NBTTagCompound properties)
//     {
//         Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(id);
//         if(Utils.notNullAndInstanceOf(entity, EntityPlayer.class)&& properties != null)
//         {
//             EntityPlayer player = (EntityPlayer)entity;
//             if(BackpackProperty.get(player) == null) BackpackProperty.register(player);
//             BackpackProperty.get(player).loadNBTData(properties);
//         }
//     }
// 
//     public void initRenderers()
//     {
//         renderHandler = new RenderHandler();
//         MinecraftForge.EVENT_BUS.register(renderHandler);
//         rendererWearableEquipped = new RendererWearableEquipped();
// 
//         rendererItemAdventureBackpack = new RendererItemAdventureBackpack();
//         MinecraftForgeClient.registerItemRenderer(ModItems.adventureBackpack, rendererItemAdventureBackpack);
//         MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.blockBackpack), rendererItemAdventureBackpack);
//         ClientRegistry.bindTileEntitySpecialRenderer(TileAdventureBackpack.class, new RendererAdventureBackpackBlock());
// 
//         rendererItemAdventureHat = new RendererItemAdventureHat();
//         MinecraftForgeClient.registerItemRenderer(ModItems.adventureHat, rendererItemAdventureHat);
// 
//         if(!ConfigHandler.TANKS_OVERLAY)
//         {
//             rendererHose = new RendererHose();
//             MinecraftForgeClient.registerItemRenderer(ModItems.hose, rendererHose);
//         }
// 
//         ClientRegistry.bindTileEntitySpecialRenderer(TileCampfire.class, new RendererCampFire());
// 
//         renderInflatableBoat = new RendererInflatableBoat();
//         RenderingRegistry.registerEntityRenderingHandler(EntityInflatableBoat.class, renderInflatableBoat);
//         renderRideableSpider = new RenderRideableSpider();
//         RenderingRegistry.registerEntityRenderingHandler(EntityFriendlySpider.class, renderRideableSpider);
// 
//         renderCrossbow = new RendererItemClockworkCrossbow();
//         MinecraftForgeClient.registerItemRenderer(ModItems.cwxbow, renderCrossbow);
//     }
// 
//     public void registerKeybindings()
//     {
//         ClientRegistry.registerKeyBinding(Keybindings.openBackpack);
//         ClientRegistry.registerKeyBinding(Keybindings.toggleHose);
//         FMLCommonHandler.instance().bus().register(new KeybindHandler());
//     }
// 
// }


// Path: src/main/java/com/darkona/adventurebackpack/handlers/RenderHandler.java
import com.darkona.adventurebackpack.proxy.ClientProxy;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.client.event.RenderPlayerEvent;

package com.darkona.adventurebackpack.handlers;


/**
 * Created on 25/12/2014
 *
 * @author Darkona
 */
public class RenderHandler
{
    @SubscribeEvent
    @SideOnly(Side.CLIENT)
    public void playerSpecialsRendering(RenderPlayerEvent.Specials.Pre event)
    {

        float rotationY = event.renderer.modelBipedMain.bipedBody.rotateAngleY;
        float rotationX = event.renderer.modelBipedMain.bipedBody.rotateAngleX;
        float rotationZ = event.renderer.modelBipedMain.bipedBody.rotateAngleZ;

        double x = event.entity.posX;
        double y = event.entity.posY;
        double z = event.entity.posZ;

        float pitch = event.entity.rotationPitch;
        float yaw = event.entity.rotationYaw;
        ClientProxy.rendererWearableEquipped.render(event.entity, x, y, z, rotationX, rotationY, rotationZ, pitch, yaw);