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;

public class ModelRedDwarfHelmet extends LOTRModelBiped {
    //fields
    ModelRenderer rightneckguard;
    ModelRenderer leftneckguard = new ModelRenderer(this, 32, 0);
    ModelRenderer shape1 = new ModelRenderer(this, 32, 18);

    public ModelRedDwarfHelmet() {

    }

    public ModelRedDwarfHelmet(float f) {
        super(f);
        this.bipedHead = new ModelRenderer(this, 0, 0);
        this.bipedHead.setRotationPoint(0F, 0F, 0F);
        this.bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f);

        rightneckguard = new ModelRenderer(this, 32, 9);
        rightneckguard.addBox(4.6F, 2.15F, -3.0F, 0, 1, 8);
        rightneckguard.setRotationPoint(0F, 0F, 0F);
        rightneckguard.setTextureSize(64, 32);
        rightneckguard.mirror = true;
        setRotation(rightneckguard, 0F, 0F, -0.2443461F);
        this.bipedHead.addChild(rightneckguard);

        leftneckguard = new ModelRenderer(this, 32, 0);
        leftneckguard.addBox(-4.6F, 2.15F, -3.0F, 0, 1, 8);
        leftneckguard.setRotationPoint(0F, 0F, 0F);
        leftneckguard.setTextureSize(64, 32);
        leftneckguard.mirror = true;
        setRotation(leftneckguard, 0F, 0F, 0.2443461F);
        this.bipedHead.addChild(leftneckguard);

        shape1 = new ModelRenderer(this, 32, 18);
        shape1.setRotationPoint(0F, 0F, 0F);
        shape1.addBox(0F, -13F, -4F, 0, 4, 10);
        shape1.setTextureSize(64, 32);
        setRotation(shape1, 0F, 0F, 0F);
        this.bipedHead.addChild(shape1);

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

    private void setRotation(ModelRenderer model, float x, float y, float z) {
        model.rotateAngleX = x;
        model.rotateAngleY = y;
        model.rotateAngleZ = z;
    }
}
