package com.acethewildfire.acesbs.entity.client;

import com.acethewildfire.acesbs.AcesBS;
import com.acethewildfire.acesbs.entity.custom.CombustibleLemonEntity;
import net.minecraft.client.model.*;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.entity.model.EntityModel;
import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Identifier;

public class CombustibleLemonModel extends EntityModel<CombustibleLemonEntity> {
    public static final EntityModelLayer C_LEMON = new EntityModelLayer(Identifier.of(AcesBS.MOD_ID, "combustible_lemon"), "main");
    private final ModelPart combustible_lemon;

    public  CombustibleLemonModel(ModelPart root) {
        this.combustible_lemon = root.getChild("combustible_lemon");
    }

    public static TexturedModelData getTexturedModelData() {
        ModelData modelData = new ModelData();
        ModelPartData modelPartData = modelData.getRoot();
        ModelPartData combustible_lemon = modelPartData.addChild("combustible_lemon", ModelPartBuilder.create().uv(64, 32).cuboid(-6.0F, -10.0F, -6.0F, 12.0F, 20.0F, 12.0F, new Dilation(-6.0F))
                .uv(0, 32).cuboid(-8.0F, -9.0F, -8.0F, 16.0F, 18.0F, 16.0F, new Dilation(-6.0F))
                .uv(64, 64).cuboid(-5.0F, -10.0F, -5.0F, 10.0F, 20.0F, 10.0F, new Dilation(-6.0F))
                .uv(0, 66).cuboid(-3.0F, -11.0F, -3.0F, 6.0F, 2.0F, 6.0F, new Dilation(-3.0F))
                .uv(24, 66).cuboid(3.0F, -9.0F, -6.0F, 4.0F, 3.0F, 4.0F, new Dilation(-2.0F))
                .uv(40, 66).cuboid(4.0F, -11.0F, -6.0F, 3.0F, 4.0F, 3.0F, new Dilation(-2.0F)), ModelTransform.pivot(0.0F, 9.0F, 0.0F));
        return TexturedModelData.of(modelData, 128, 128);
    }
    @Override
    public void setAngles(CombustibleLemonEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {

    }
    @Override
    public void render(MatrixStack matrices, VertexConsumer vertexConsumer, int light, int overlay, int color) {
        combustible_lemon.render(matrices, vertexConsumer, light, overlay, color);
    }
}
