| 1 | package net.minecraft.client.model.animal.nautilus;
|
| 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 NautilusArmorModel extends NautilusModel {
|
| 15 | private final ModelPart nautilus;
|
| 16 | private final ModelPart shell;
|
| 17 |
|
| 18 | public NautilusArmorModel(final ModelPart root) {
|
| 19 | super(root);
|
| 20 | this.nautilus = root.getChild("root");
|
| 21 | this.shell = this.nautilus.getChild("shell");
|
| 22 | }
|
| 23 |
|
| 24 | public static LayerDefinition createBodyLayer() {
|
| 25 | MeshDefinition meshdefinition = createBodyMesh();
|
| 26 | PartDefinition partdefinition = meshdefinition.getRoot();
|
| 27 | PartDefinition nautilus = partdefinition.addOrReplaceChild("root", CubeListBuilder.create(), PartPose.offset(0.0F, 29.0F, -6.0F));
|
| 28 | PartDefinition shell = nautilus.addOrReplaceChild(
|
| 29 | "shell",
|
| 30 | CubeListBuilder.create()
|
| 31 | .texOffs(0, 0)
|
| 32 | .addBox(-7.0F, -10.0F, -7.0F, 14.0F, 10.0F, 16.0F, new CubeDeformation(0.01F))
|
| 33 | .texOffs(0, 26)
|
| 34 | .addBox(-7.0F, 0.0F, -7.0F, 14.0F, 8.0F, 20.0F, new CubeDeformation(0.01F))
|
| 35 | .texOffs(48, 26)
|
| 36 | .addBox(-7.0F, 0.0F, 6.0F, 14.0F, 8.0F, 0.0F, new CubeDeformation(0.0F)),
|
| 37 | PartPose.offset(0.0F, -13.0F, 5.0F)
|
| 38 | );
|
| 39 | return LayerDefinition.create(meshdefinition, 128, 128);
|
| 40 | }
|
| 41 | }
|
| 42 |
|