| 1 | package net.minecraft.client.model.animal.cow;
|
| 2 |
|
| 3 | import net.fabricmc.api.EnvType;
|
| 4 | import net.fabricmc.api.Environment;
|
| 5 | import net.minecraft.client.model.geom.ModelPart;
|
| 6 | import net.minecraft.client.model.geom.PartPose;
|
| 7 | import net.minecraft.client.model.geom.builders.CubeDeformation;
|
| 8 | import net.minecraft.client.model.geom.builders.CubeListBuilder;
|
| 9 | import net.minecraft.client.model.geom.builders.LayerDefinition;
|
| 10 | import net.minecraft.client.model.geom.builders.MeshDefinition;
|
| 11 | import net.minecraft.client.model.geom.builders.PartDefinition;
|
| 12 |
|
| 13 | @Environment(EnvType.CLIENT)
|
| 14 | public class ColdCowModel extends CowModel {
|
| 15 | public ColdCowModel(final ModelPart root) {
|
| 16 | super(root);
|
| 17 | }
|
| 18 |
|
| 19 | public static LayerDefinition createBodyLayer() {
|
| 20 | MeshDefinition mesh = createBaseCowModel();
|
| 21 | mesh.getRoot()
|
| 22 | .addOrReplaceChild(
|
| 23 | "body",
|
| 24 | CubeListBuilder.create()
|
| 25 | .texOffs(20, 32)
|
| 26 | .addBox(-6.0F, -10.0F, -7.0F, 12.0F, 18.0F, 10.0F, new CubeDeformation(0.5F))
|
| 27 | .texOffs(18, 4)
|
| 28 | .addBox(-6.0F, -10.0F, -7.0F, 12.0F, 18.0F, 10.0F)
|
| 29 | .texOffs(52, 0)
|
| 30 | .addBox(-2.0F, 2.0F, -8.0F, 4.0F, 6.0F, 1.0F),
|
| 31 | PartPose.offsetAndRotation(0.0F, 5.0F, 2.0F, (float) (Math.PI / 2), 0.0F, 0.0F)
|
| 32 | );
|
| 33 | PartDefinition head = mesh.getRoot()
|
| 34 | .addOrReplaceChild(
|
| 35 | "head",
|
| 36 | CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -4.0F, -6.0F, 8.0F, 8.0F, 6.0F).texOffs(9, 33).addBox(-3.0F, 1.0F, -7.0F, 6.0F, 3.0F, 1.0F),
|
| 37 | PartPose.offset(0.0F, 4.0F, -8.0F)
|
| 38 | );
|
| 39 | head.addOrReplaceChild(
|
| 40 | "right_horn",
|
| 41 | CubeListBuilder.create().texOffs(0, 40).addBox(-1.5F, -4.5F, -0.5F, 2.0F, 6.0F, 2.0F),
|
| 42 | PartPose.offsetAndRotation(-4.5F, -2.5F, -3.5F, 1.5708F, 0.0F, 0.0F)
|
| 43 | );
|
| 44 | head.addOrReplaceChild(
|
| 45 | "left_horn",
|
| 46 | CubeListBuilder.create().texOffs(0, 32).addBox(-1.5F, -3.0F, -0.5F, 2.0F, 6.0F, 2.0F),
|
| 47 | PartPose.offsetAndRotation(5.5F, -2.5F, -5.0F, 1.5708F, 0.0F, 0.0F)
|
| 48 | );
|
| 49 | return LayerDefinition.create(mesh, 64, 64);
|
| 50 | }
|
| 51 | }
|
| 52 |
|