cawezs_expanded_world/models/mojmap-1.20.x/ModelCatHatID.java
2024-04-28 11:00:35 -04:00

43 lines
2.1 KiB
Java
Executable File

// Made with Blockbench 4.8.3
// Exported for Minecraft version 1.17 or later with Mojang mappings
// Paste this class into your mod and generate all required imports
public class ModelCatHatID<T extends Entity> extends EntityModel<T> {
// This layer location should be baked with EntityRendererProvider.Context in
// the entity renderer and passed into this model's constructor
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(
new ResourceLocation("modid", "cathatid"), "main");
private final ModelPart bb_main;
public ModelCatHatID(ModelPart root) {
this.bb_main = root.getChild("bb_main");
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition bb_main = partdefinition.addOrReplaceChild("bb_main",
CubeListBuilder.create().texOffs(0, 0)
.addBox(-5.0F, -9.0F, -1.0F, 10.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)).texOffs(0, 0)
.addBox(-5.0F, -7.0F, -1.0F, 2.0F, 3.0F, 2.0F, new CubeDeformation(0.0F)).texOffs(0, 0)
.addBox(3.0F, -7.0F, -1.0F, 2.0F, 3.0F, 2.0F, new CubeDeformation(0.0F)).texOffs(2, 2)
.addBox(1.0F, -10.0F, 0.0F, 3.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)).texOffs(2, 2)
.addBox(-4.0F, -10.0F, 0.0F, 3.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)).texOffs(2, 2)
.addBox(2.0F, -11.0F, 0.0F, 1.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)).texOffs(2, 2)
.addBox(-3.0F, -11.0F, 0.0F, 1.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)),
PartPose.offset(0.0F, 24.0F, 0.0F));
return LayerDefinition.create(meshdefinition, 16, 16);
}
@Override
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay,
float red, float green, float blue, float alpha) {
bb_main.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
}
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
float headPitch) {
}
}