65 lines
3.0 KiB
Java
65 lines
3.0 KiB
Java
// Made with Blockbench 4.12.4
|
|
// Exported for Minecraft version 1.17 or later with Mojang mappings
|
|
// Paste this class into your mod and generate all required imports
|
|
|
|
public class ModelCallion<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", "callion"), "main");
|
|
private final ModelPart bone;
|
|
private final ModelPart bone2;
|
|
private final ModelPart bone3;
|
|
private final ModelPart bone4;
|
|
private final ModelPart bone5;
|
|
|
|
public ModelCallion(ModelPart root) {
|
|
this.bone = root.getChild("bone");
|
|
this.bone2 = root.getChild("bone2");
|
|
this.bone3 = root.getChild("bone3");
|
|
this.bone4 = root.getChild("bone4");
|
|
this.bone5 = root.getChild("bone5");
|
|
}
|
|
|
|
public static LayerDefinition createBodyLayer() {
|
|
MeshDefinition meshdefinition = new MeshDefinition();
|
|
PartDefinition partdefinition = meshdefinition.getRoot();
|
|
|
|
PartDefinition bone = partdefinition.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(32, 48).addBox(
|
|
-4.0F, 0.0F, -4.0F, 8.0F, 8.0F, 8.0F, new CubeDeformation(0.0F)), PartPose.offset(4.0F, 16.0F, -4.0F));
|
|
|
|
PartDefinition bone2 = partdefinition.addOrReplaceChild("bone2", CubeListBuilder.create().texOffs(24, 48)
|
|
.addBox(-4.0F, 0.0F, -4.0F, 8.0F, 8.0F, 8.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(-4.0F, 16.0F, -4.0F));
|
|
|
|
PartDefinition bone3 = partdefinition.addOrReplaceChild("bone3", CubeListBuilder.create().texOffs(16, 48)
|
|
.addBox(-4.0F, 0.0F, -4.0F, 8.0F, 8.0F, 8.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(-4.0F, 16.0F, 4.0F));
|
|
|
|
PartDefinition bone4 = partdefinition.addOrReplaceChild("bone4", CubeListBuilder.create().texOffs(24, 48)
|
|
.addBox(-4.0F, 0.0F, -4.0F, 8.0F, 8.0F, 8.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(4.0F, 16.0F, 4.0F));
|
|
|
|
PartDefinition bone5 = partdefinition.addOrReplaceChild("bone5", CubeListBuilder.create().texOffs(0, 0)
|
|
.addBox(-8.0F, -16.0F, -8.0F, 16.0F, 8.0F, 16.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(0.0F, 24.0F, 0.0F));
|
|
|
|
return LayerDefinition.create(meshdefinition, 64, 64);
|
|
}
|
|
|
|
@Override
|
|
public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
|
|
float headPitch) {
|
|
|
|
}
|
|
|
|
@Override
|
|
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay,
|
|
float red, float green, float blue, float alpha) {
|
|
bone.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
|
bone2.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
|
bone3.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
|
bone4.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
|
bone5.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
|
}
|
|
} |