package com.zivilon.cinder_loe.client.model;

import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

/**
 * JadeHelmet - Cleric_red
 * Created using Tabula 4.1.1
 */
public class ModelJadeHelmet extends LOTRModelBiped {
    public ModelRenderer brframe;
    public ModelRenderer frframe;
    public ModelRenderer blframe;
    public ModelRenderer frframe_1;
    public ModelRenderer fgold;
    public ModelRenderer bgold;
    public ModelRenderer tgold;
    public ModelRenderer glframe;
    public ModelRenderer grframe;
    public ModelRenderer back;
    public ModelRenderer backangle;
    public ModelRenderer Holder;
    public ModelRenderer moon;

    public ModelJadeHelmet(float f) {
        super (f);

        this.textureWidth = 64;
        this.textureHeight = 32;
        this.bipedHead.cubeList.clear();
        this.Holder = new ModelRenderer(this, 21, 22);
        this.Holder.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.Holder.addBox(-1.0F, -12.2F, -8.0F, 2, 3, 1, 0.0F);
        this.setRotateAngle(Holder, -0.136659280431156F, 0.0F, 0.0F);
        this.moon = new ModelRenderer(this, 0, 0);
        this.moon.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.moon.addBox(-5.5F, -16.2F, -7.3F, 11, 7, 0, 0.0F);
        this.setRotateAngle(moon, -0.136659280431156F, 0.0F, 0.0F);

        this.bgold = new ModelRenderer(this, 14, 19);
        this.bgold.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.bgold.addBox(-3.5F, -11.2F, 0.0F, 7, 2, 7, 0.0F);
        this.setRotateAngle(bgold, -0.17453292519943295F, 0.0F, 0.0F);

        this.glframe = new ModelRenderer(this, 21, 14);
        this.glframe.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.glframe.addBox(7.4F, -7.4F, -2.5F, 1, 8, 5, 0.0F);
        this.setRotateAngle(glframe, 0.0F, 0.0F, -0.6108652381980153F);

        this.backangle = new ModelRenderer(this, 0, 7);
        this.backangle.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.backangle.addBox(-5.0F, -2.4F, 6.2F, 10, 5, 1, 0.0F);
        this.setRotateAngle(backangle, 0.36425021489121656F, 0.0F, 0.0F);

        this.frframe = new ModelRenderer(this, 0, 14);
        this.frframe.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.frframe.addBox(-8.6F, -7.5F, -7.0F, 1, 8, 6, 0.0F);
        this.setRotateAngle(frframe, 0.17453292519943295F, 0.0F, 0.6108652381980153F);

        this.blframe = new ModelRenderer(this, 0, 14);
        this.blframe.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.blframe.addBox(7.6F, -7.5F, 1.0F, 1, 8, 6, 0.0F);
        this.setRotateAngle(blframe, -0.17453292519943295F, 0.0F, -0.6108652381980153F);

        this.fgold = new ModelRenderer(this, 14, 19);
        this.fgold.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.fgold.addBox(-3.5F, -11.2F, -7.0F, 7, 2, 7, 0.0F);
        this.setRotateAngle(fgold, 0.17453292519943295F, 0.0F, 0.0F);

        this.back = new ModelRenderer(this, 0, 8);
        this.back.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.back.addBox(-5.0F, -7.9F, 5.0F, 10, 4, 1, 0.0F);

        this.tgold = new ModelRenderer(this, 16, 21);
        this.tgold.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.tgold.addBox(-3.5F, -11.31F, -2.5F, 7, 2, 5, 0.0F);
        this.brframe = new ModelRenderer(this, 0, 14);
        this.brframe.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.brframe.addBox(-8.6F, -7.5F, 1.0F, 1, 8, 6, 0.0F);
        this.setRotateAngle(brframe, -0.17453292519943295F, 0.0F, 0.6108652381980153F);
        this.frframe_1 = new ModelRenderer(this, 0, 14);
        this.frframe_1.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.frframe_1.addBox(7.6F, -7.5F, -7.0F, 1, 8, 6, 0.0F);
        this.setRotateAngle(frframe_1, 0.17453292519943295F, 0.0F, -0.6108652381980153F);
        this.grframe = new ModelRenderer(this, 21, 15);
        this.grframe.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.grframe.addBox(-8.5F, -7.4F, -2.5F, 1, 8, 5, 0.0F);
        this.setRotateAngle(grframe, 0.0F, 0.0F, 0.6108652381980153F);
        this.bipedHead = new ModelRenderer(this, 32, 0);
        this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.5F);
        this.bipedHead.addChild(this.Holder);
        this.bipedHead.addChild(this.moon);
        this.bipedHead.addChild(this.bgold);
        this.bipedHead.addChild(this.glframe);
        this.bipedHead.addChild(this.backangle);
        this.bipedHead.addChild(this.frframe);
        this.bipedHead.addChild(this.blframe);
        this.bipedHead.addChild(this.fgold);
        this.bipedHead.addChild(this.back);
        this.bipedHead.addChild(this.tgold);
        this.bipedHead.addChild(this.brframe);
        this.bipedHead.addChild(this.frframe_1);
        this.bipedHead.addChild(this.grframe);

        this.bipedHeadwear.cubeList.clear();
        this.bipedBody.cubeList.clear();
        this.bipedRightArm.cubeList.clear();
        this.bipedLeftArm.cubeList.clear();
        this.bipedRightLeg.cubeList.clear();
        this.bipedLeftLeg.cubeList.clear();
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 
        this.bipedHead.render(f5);
    }

    /**
     * This is a helper function from Tabula to set the rotation of model parts
     */
    public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}
