package com.zivilon.cinder_loe.client.model;

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

public class ModelBreeKettleHelmet extends LOTRModelBiped {
    public ModelRenderer shape9;

    public ModelBreeKettleHelmet(float f) {
        super(f); // Call the parent constructor to initialize the biped parts

        this.textureWidth = 64;
        this.textureHeight = 32;

        // Define the shape9 part and attach it to bipedHead
        this.shape9 = new ModelRenderer(this, 0, 16);
        this.shape9.setRotationPoint(0.0F, 0.0F, 0.0F);
        //shape9.addBox(0F, -13F, -4F, 0, 4, 10);
        this.shape9.addBox(-7.0F, -6.0F, -7.0F, 14, 0, 14, 0.0F);

        // Clear any previously defined parts for the bipedHead
        this.bipedHead.cubeList.clear();

        // Define the main helmet part and attach shape9 to it
        this.bipedHead = new ModelRenderer(this, 0, 0);
        this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
       // this.bipedHead.addBox(-4.5F, -9.0F, -4.5F, 9, 9, 9, 0.5F); // Adjusted position and scale
        this.bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f); // Adjusted position and scale (f)
        this.bipedHead.addChild(this.shape9);

        // Clear unnecessary parts
        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;
    }
}
