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;

/**
 * heavyHelmet - Cleric
 * Created using Tabula 4.1.1
 */
public class ModelWarlordHelmet extends LOTRModelBiped {
    public ModelRenderer leftmaw;
    public ModelRenderer rightmaw;
    public ModelRenderer shape31;
    public ModelRenderer hair;
    public ModelRenderer mane;
    public ModelRenderer lefttrim;
    public ModelRenderer righttrim;
    public ModelRenderer Teeth;

    public ModelWarlordHelmet(float f) {
        super (f);
        this.textureWidth = 64;
        this.textureHeight = 32;

        this.shape31 = new ModelRenderer(this, 2, 2);
        this.shape31.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.shape31.addBox(-4.0F, -10.0F, -7.0F, 8, 3, 6, 1.0F);
        this.mane = new ModelRenderer(this, 8, 27);
        this.mane.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.mane.addBox(-4.0F, 1.0F, 5.0F, 8, 3, 0, 0.0F);
        this.leftmaw = new ModelRenderer(this, 24, 8);
        this.leftmaw.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.leftmaw.addBox(-4.7F, -4.0F, -12.3F, 0, 4, 7, 0.0F);
        this.setRotateAngle(leftmaw, 0.0F, 0.12217304763960307F, 0.0F);
        this.hair = new ModelRenderer(this, 30, 6);
        this.hair.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.hair.addBox(-3.0F, -8.7F, -3.0F, 6, 1, 4, 1.0F);
        this.setRotateAngle(hair, -0.22759093446006054F, 0.0F, 0.0F);
        this.righttrim = new ModelRenderer(this, 32, 15);
        this.righttrim.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.righttrim.addBox(4.2F, -7.9F, -3.9F, 0, 8, 4, 1.0F);
        this.lefttrim = new ModelRenderer(this, 32, 15);
        this.lefttrim.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.lefttrim.addBox(-4.2F, -7.9F, -3.9F, 0, 8, 4, 1.0F);
        this.Teeth = new ModelRenderer(this, 32, 12);
        this.Teeth.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.Teeth.addBox(-4.0F, -6.0F, -6.0F, 8, 3, 0, 0.0F);
        this.rightmaw = new ModelRenderer(this, 24, 8);
        this.rightmaw.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.rightmaw.addBox(4.7F, -4.0F, -12.3F, 0, 4, 7, 0.0F);
        this.setRotateAngle(rightmaw, 0.0F, -0.12217304763960307F, 0.0F);

        this.bipedHead.cubeList.clear();

        this.bipedHead = new ModelRenderer(this, 0, 11);
        this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.bipedHead.addBox(-4.0F, -8F, -4.0F, 8, 8, 8, 1.0F);

        this.bipedHead.addChild(this.shape31);
        this.bipedHead.addChild(this.mane);
        this.bipedHead.addChild(this.leftmaw);
        this.bipedHead.addChild(this.hair);
        this.bipedHead.addChild(this.righttrim);
        this.bipedHead.addChild(this.lefttrim);
        this.bipedHead.addChild(this.Teeth);
        this.bipedHead.addChild(this.rightmaw);

        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;
    }
}
