74 lines
3.9 KiB
Java
74 lines
3.9 KiB
Java
// Made with Blockbench 4.12.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 Modelceilock_model<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", "ceilock_model"), "main");
|
|
private final ModelPart bone;
|
|
private final ModelPart bone2;
|
|
private final ModelPart bone3;
|
|
private final ModelPart bone4;
|
|
private final ModelPart bb_main;
|
|
|
|
public Modelceilock_model(ModelPart root) {
|
|
this.bone = root.getChild("bone");
|
|
this.bone2 = root.getChild("bone2");
|
|
this.bone3 = root.getChild("bone3");
|
|
this.bone4 = root.getChild("bone4");
|
|
this.bb_main = root.getChild("bb_main");
|
|
}
|
|
|
|
public static LayerDefinition createBodyLayer() {
|
|
MeshDefinition meshdefinition = new MeshDefinition();
|
|
PartDefinition partdefinition = meshdefinition.getRoot();
|
|
|
|
PartDefinition bone = partdefinition.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(24, 16).addBox(
|
|
0.0F, 1.0F, -6.0F, 1.0F, 11.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(5.0F, 23.0F, 0.0F));
|
|
|
|
PartDefinition bone2 = partdefinition.addOrReplaceChild("bone2", CubeListBuilder.create().texOffs(10, 28)
|
|
.addBox(1.0F, 1.0F, 0.0F, 5.0F, 11.0F, 1.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(0.0F, 23.0F, 5.0F));
|
|
|
|
PartDefinition bone3 = partdefinition.addOrReplaceChild("bone3", CubeListBuilder.create().texOffs(22, 31)
|
|
.addBox(-6.0F, 1.0F, -1.0F, 5.0F, 11.0F, 1.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(0.0F, 23.0F, -5.0F));
|
|
|
|
PartDefinition bone4 = partdefinition.addOrReplaceChild("bone4", CubeListBuilder.create().texOffs(0, 28).addBox(
|
|
-1.0F, 1.0F, 2.0F, 1.0F, 11.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(-5.0F, 23.0F, 0.0F));
|
|
|
|
PartDefinition bb_main = partdefinition.addOrReplaceChild("bb_main",
|
|
CubeListBuilder.create().texOffs(0, 0)
|
|
.addBox(-7.0F, -2.0F, -7.0F, 14.0F, 2.0F, 14.0F, new CubeDeformation(0.0F)).texOffs(34, 16)
|
|
.addBox(5.0F, -10.0F, 5.0F, 1.0F, 8.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(34, 25)
|
|
.addBox(4.0F, -10.0F, -4.0F, 1.0F, 8.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(34, 34)
|
|
.addBox(-2.0F, -10.0F, -6.0F, 1.0F, 8.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(38, 16)
|
|
.addBox(2.0F, -10.0F, 1.0F, 1.0F, 8.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(38, 25)
|
|
.addBox(-3.0F, -10.0F, 4.0F, 1.0F, 8.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(38, 34)
|
|
.addBox(-1.0F, -10.0F, -1.0F, 1.0F, 8.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(10, 40)
|
|
.addBox(-6.0F, -10.0F, -3.0F, 1.0F, 8.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(14, 40)
|
|
.addBox(-5.0F, -10.0F, 2.0F, 1.0F, 8.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(0, 16)
|
|
.addBox(-3.0F, 0.0F, -3.0F, 6.0F, 6.0F, 6.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);
|
|
bb_main.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
|
}
|
|
} |