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;

/**
 * UsurperHelmet - Cleric_red
 * Created using Tabula 4.1.1
 */
public class ModelUsurperHelmet extends LOTRModelBiped {
    public ModelRenderer leftfan;
    public ModelRenderer rightfan;
    public ModelRenderer leftfeather;
    public ModelRenderer rightfeather;
    public ModelRenderer shape15;

    public ModelUsurperHelmet(float f) {
        super (f);
        this.textureWidth = 64;
        this.textureHeight = 32;
        this.leftfan = new ModelRenderer(this, 32, 19);
        this.leftfan.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.leftfan.addBox(-8.4F, -12.0F, -1.0F, 4, 12, 1, 0.0F);
        this.setRotateAngle(leftfan, 0.0F, 0.3490658503988659F, 0.0F);
        this.leftfeather = new ModelRenderer(this, 43, 20);
        this.leftfeather.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.leftfeather.addBox(-8.4F, -12.0F, -0.5F, 4, 12, 0, 0.0F);
        this.setRotateAngle(leftfeather, 0.0F, 0.3490658503988659F, 0.0F);
        this.rightfan = new ModelRenderer(this, 32, 5);
        this.rightfan.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.rightfan.addBox(4.6F, -12.0F, -1.0F, 4, 12, 1, 0.0F);
        this.setRotateAngle(rightfan, 0.0F, -0.3490658503988659F, 0.0F);
        this.shape15 = new ModelRenderer(this, 8, 16);
        this.shape15.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.shape15.addBox(-4.0F, -7.0F, -5.2F, 8, 6, 0, 0.0F);
        this.rightfeather = new ModelRenderer(this, 43, 6);
        this.rightfeather.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.rightfeather.addBox(4.6F, -12.0F, -0.5F, 4, 12, 0, 0.0F);
        this.setRotateAngle(rightfeather, 0.0F, -0.3490658503988659F, 0.0F);

        this.bipedHead.cubeList.clear();

        this.bipedHead = new ModelRenderer(this, 0, 0);
        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.leftfan);
        this.bipedHead.addChild(this.leftfeather);
        this.bipedHead.addChild(this.rightfan);
        this.bipedHead.addChild(this.shape15);
        this.bipedHead.addChild(this.rightfeather);

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