| 1 | package net.minecraft.client.model.animal.camel;
|
| 2 |
|
| 3 | import net.fabricmc.api.EnvType;
|
| 4 | import net.fabricmc.api.Environment;
|
| 5 | import net.minecraft.client.animation.definitions.CamelAnimation;
|
| 6 | import net.minecraft.client.model.geom.ModelPart;
|
| 7 | import net.minecraft.client.model.geom.PartPose;
|
| 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 AdultCamelModel extends CamelModel {
|
| 15 | public AdultCamelModel(final ModelPart root) {
|
| 16 | super(
|
| 17 | root,
|
| 18 | CamelAnimation.CAMEL_WALK,
|
| 19 | CamelAnimation.CAMEL_SIT,
|
| 20 | CamelAnimation.CAMEL_SIT_POSE,
|
| 21 | CamelAnimation.CAMEL_STANDUP,
|
| 22 | CamelAnimation.CAMEL_IDLE,
|
| 23 | CamelAnimation.CAMEL_DASH
|
| 24 | );
|
| 25 | }
|
| 26 |
|
| 27 | public static LayerDefinition createBodyLayer() {
|
| 28 | return LayerDefinition.create(createBodyMesh(), 128, 128);
|
| 29 | }
|
| 30 |
|
| 31 | protected static MeshDefinition createBodyMesh() {
|
| 32 | MeshDefinition mesh = new MeshDefinition();
|
| 33 | PartDefinition root = mesh.getRoot();
|
| 34 | PartDefinition body = root.addOrReplaceChild(
|
| 35 | "body", CubeListBuilder.create().texOffs(0, 25).addBox(-7.5F, -12.0F, -23.5F, 15.0F, 12.0F, 27.0F), PartPose.offset(0.0F, 4.0F, 9.5F)
|
| 36 | );
|
| 37 | body.addOrReplaceChild("hump", CubeListBuilder.create().texOffs(74, 0).addBox(-4.5F, -5.0F, -5.5F, 9.0F, 5.0F, 11.0F), PartPose.offset(0.0F, -12.0F, -10.0F));
|
| 38 | body.addOrReplaceChild("tail", CubeListBuilder.create().texOffs(122, 0).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 14.0F, 0.0F), PartPose.offset(0.0F, -9.0F, 3.5F));
|
| 39 | PartDefinition head = body.addOrReplaceChild(
|
| 40 | "head",
|
| 41 | CubeListBuilder.create()
|
| 42 | .texOffs(60, 24)
|
| 43 | .addBox(-3.5F, -7.0F, -15.0F, 7.0F, 8.0F, 19.0F)
|
| 44 | .texOffs(21, 0)
|
| 45 | .addBox(-3.5F, -21.0F, -15.0F, 7.0F, 14.0F, 7.0F)
|
| 46 | .texOffs(50, 0)
|
| 47 | .addBox(-2.5F, -21.0F, -21.0F, 5.0F, 5.0F, 6.0F),
|
| 48 | PartPose.offset(0.0F, -3.0F, -19.5F)
|
| 49 | );
|
| 50 | head.addOrReplaceChild("left_ear", CubeListBuilder.create().texOffs(45, 0).addBox(-0.5F, 0.5F, -1.0F, 3.0F, 1.0F, 2.0F), PartPose.offset(2.5F, -21.0F, -9.5F));
|
| 51 | head.addOrReplaceChild(
|
| 52 | "right_ear", CubeListBuilder.create().texOffs(67, 0).addBox(-2.5F, 0.5F, -1.0F, 3.0F, 1.0F, 2.0F), PartPose.offset(-2.5F, -21.0F, -9.5F)
|
| 53 | );
|
| 54 | root.addOrReplaceChild(
|
| 55 | "left_hind_leg", CubeListBuilder.create().texOffs(58, 16).addBox(-2.5F, 2.0F, -2.5F, 5.0F, 21.0F, 5.0F), PartPose.offset(4.9F, 1.0F, 9.5F)
|
| 56 | );
|
| 57 | root.addOrReplaceChild(
|
| 58 | "right_hind_leg", CubeListBuilder.create().texOffs(94, 16).addBox(-2.5F, 2.0F, -2.5F, 5.0F, 21.0F, 5.0F), PartPose.offset(-4.9F, 1.0F, 9.5F)
|
| 59 | );
|
| 60 | root.addOrReplaceChild(
|
| 61 | "left_front_leg", CubeListBuilder.create().texOffs(0, 0).addBox(-2.5F, 2.0F, -2.5F, 5.0F, 21.0F, 5.0F), PartPose.offset(4.9F, 1.0F, -10.5F)
|
| 62 | );
|
| 63 | root.addOrReplaceChild(
|
| 64 | "right_front_leg", CubeListBuilder.create().texOffs(0, 26).addBox(-2.5F, 2.0F, -2.5F, 5.0F, 21.0F, 5.0F), PartPose.offset(-4.9F, 1.0F, -10.5F)
|
| 65 | );
|
| 66 | return mesh;
|
| 67 | }
|
| 68 | }
|
| 69 |
|