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 ModelBrokenHalo extends LOTRModelBiped {
    public ModelRenderer shape9;

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

        this.textureWidth = 128;
        this.textureHeight = 64;

        this.shape9 = new ModelRenderer(this, 32, 16);
        this.shape9.setRotationPoint(0.0F, 0.0F, 0.0F);

        this.shape9.addBox(-8.0F, -14.0F, 5.0F, 16, 16, 0, 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(-4F, -8F, -4F, 8, 8, 8, f); // Adjusted position and scale (f)
        this.bipedHead.addChild(this.shape9);

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