| 1 | package net.minecraft.client.model.animal.golem;
|
| 2 |
|
| 3 | import com.mojang.blaze3d.vertex.PoseStack;
|
| 4 | import com.mojang.math.Axis;
|
| 5 | import java.util.Set;
|
| 6 | import net.fabricmc.api.EnvType;
|
| 7 | import net.fabricmc.api.Environment;
|
| 8 | import net.minecraft.client.animation.KeyframeAnimation;
|
| 9 | import net.minecraft.client.animation.definitions.CopperGolemAnimation;
|
| 10 | import net.minecraft.client.model.ArmedModel;
|
| 11 | import net.minecraft.client.model.EntityModel;
|
| 12 | import net.minecraft.client.model.HeadedModel;
|
| 13 | import net.minecraft.client.model.geom.ModelPart;
|
| 14 | import net.minecraft.client.model.geom.PartPose;
|
| 15 | import net.minecraft.client.model.geom.builders.CubeDeformation;
|
| 16 | import net.minecraft.client.model.geom.builders.CubeListBuilder;
|
| 17 | import net.minecraft.client.model.geom.builders.LayerDefinition;
|
| 18 | import net.minecraft.client.model.geom.builders.MeshDefinition;
|
| 19 | import net.minecraft.client.model.geom.builders.PartDefinition;
|
| 20 | import net.minecraft.client.renderer.entity.state.CopperGolemRenderState;
|
| 21 | import net.minecraft.world.entity.HumanoidArm;
|
| 22 | import net.minecraft.world.entity.animal.golem.CopperGolemState;
|
| 23 |
|
| 24 | @Environment(EnvType.CLIENT)
|
| 25 | public class CopperGolemModel extends EntityModel<CopperGolemRenderState> implements ArmedModel<CopperGolemRenderState>, HeadedModel {
|
| 26 | private static final float MAX_WALK_ANIMATION_SPEED = 2.0F;
|
| 27 | private static final float WALK_ANIMATION_SCALE_FACTOR = 2.5F;
|
| 28 | private static final float Z_FIGHT_MITIGATION = 0.015F;
|
| 29 | private final ModelPart head;
|
| 30 | private final ModelPart body;
|
| 31 | private final ModelPart rightArm;
|
| 32 | private final ModelPart leftArm;
|
| 33 | private final KeyframeAnimation walkAnimation;
|
| 34 | private final KeyframeAnimation walkWithItemAnimation;
|
| 35 | private final KeyframeAnimation idleAnimation;
|
| 36 | private final KeyframeAnimation interactionGetItem;
|
| 37 | private final KeyframeAnimation interactionGetNoItem;
|
| 38 | private final KeyframeAnimation interactionDropItem;
|
| 39 | private final KeyframeAnimation interactionDropNoItem;
|
| 40 |
|
| 41 | public CopperGolemModel(final ModelPart root) {
|
| 42 | super(root);
|
| 43 | this.body = root.getChild("body");
|
| 44 | this.head = this.body.getChild("head");
|
| 45 | this.rightArm = this.body.getChild("right_arm");
|
| 46 | this.leftArm = this.body.getChild("left_arm");
|
| 47 | this.walkAnimation = CopperGolemAnimation.COPPER_GOLEM_WALK.bake(root);
|
| 48 | this.walkWithItemAnimation = CopperGolemAnimation.COPPER_GOLEM_WALK_ITEM.bake(root);
|
| 49 | this.idleAnimation = CopperGolemAnimation.COPPER_GOLEM_IDLE.bake(root);
|
| 50 | this.interactionGetItem = CopperGolemAnimation.COPPER_GOLEM_CHEST_INTERACTION_NOITEM_GET.bake(root);
|
| 51 | this.interactionGetNoItem = CopperGolemAnimation.COPPER_GOLEM_CHEST_INTERACTION_NOITEM_NOGET.bake(root);
|
| 52 | this.interactionDropItem = CopperGolemAnimation.COPPER_GOLEM_CHEST_INTERACTION_ITEM_DROP.bake(root);
|
| 53 | this.interactionDropNoItem = CopperGolemAnimation.COPPER_GOLEM_CHEST_INTERACTION_ITEM_NODROP.bake(root);
|
| 54 | }
|
| 55 |
|
| 56 | public static LayerDefinition createBodyLayer() {
|
| 57 | MeshDefinition meshDefinition = new MeshDefinition().transformed(p -> p.translated(0.0F, 24.0F, 0.0F));
|
| 58 | PartDefinition root = meshDefinition.getRoot();
|
| 59 | PartDefinition body = root.addOrReplaceChild(
|
| 60 | "body", CubeListBuilder.create().texOffs(0, 15).addBox(-4.0F, -6.0F, -3.0F, 8.0F, 6.0F, 6.0F, CubeDeformation.NONE), PartPose.offset(0.0F, -5.0F, 0.0F)
|
| 61 | );
|
| 62 | body.addOrReplaceChild(
|
| 63 | "head",
|
| 64 | CubeListBuilder.create()
|
| 65 | .texOffs(0, 0)
|
| 66 | .addBox(-4.0F, -5.0F, -5.0F, 8.0F, 5.0F, 10.0F, new CubeDeformation(0.015F))
|
| 67 | .texOffs(56, 0)
|
| 68 | .addBox(-1.0F, -2.0F, -6.0F, 2.0F, 3.0F, 2.0F, CubeDeformation.NONE)
|
| 69 | .texOffs(37, 8)
|
| 70 | .addBox(-1.0F, -9.0F, -1.0F, 2.0F, 4.0F, 2.0F, new CubeDeformation(-0.015F))
|
| 71 | .texOffs(37, 0)
|
| 72 | .addBox(-2.0F, -13.0F, -2.0F, 4.0F, 4.0F, 4.0F, new CubeDeformation(-0.015F)),
|
| 73 | PartPose.offset(0.0F, -6.0F, 0.0F)
|
| 74 | );
|
| 75 | body.addOrReplaceChild(
|
| 76 | "right_arm",
|
| 77 | CubeListBuilder.create().texOffs(36, 16).addBox(-3.0F, -1.0F, -2.0F, 3.0F, 10.0F, 4.0F, CubeDeformation.NONE),
|
| 78 | PartPose.offset(-4.0F, -6.0F, 0.0F)
|
| 79 | );
|
| 80 | body.addOrReplaceChild(
|
| 81 | "left_arm", CubeListBuilder.create().texOffs(50, 16).addBox(0.0F, -1.0F, -2.0F, 3.0F, 10.0F, 4.0F, CubeDeformation.NONE), PartPose.offset(4.0F, -6.0F, 0.0F)
|
| 82 | );
|
| 83 | root.addOrReplaceChild(
|
| 84 | "right_leg", CubeListBuilder.create().texOffs(0, 27).addBox(-4.0F, 0.0F, -2.0F, 4.0F, 5.0F, 4.0F, CubeDeformation.NONE), PartPose.offset(0.0F, -5.0F, 0.0F)
|
| 85 | );
|
| 86 | root.addOrReplaceChild(
|
| 87 | "left_leg", CubeListBuilder.create().texOffs(16, 27).addBox(0.0F, 0.0F, -2.0F, 4.0F, 5.0F, 4.0F, CubeDeformation.NONE), PartPose.offset(0.0F, -5.0F, 0.0F)
|
| 88 | );
|
| 89 | return LayerDefinition.create(meshDefinition, 64, 64);
|
| 90 | }
|
| 91 |
|
| 92 | public static LayerDefinition createRunningPoseBodyLayer() {
|
| 93 | MeshDefinition meshDefinition = new MeshDefinition().transformed(p -> p.translated(0.0F, 0.0F, 0.0F));
|
| 94 | PartDefinition root = meshDefinition.getRoot();
|
| 95 | PartDefinition body = root.addOrReplaceChild("body", CubeListBuilder.create(), PartPose.offset(-1.064F, -5.0F, 0.0F));
|
| 96 | body.addOrReplaceChild(
|
| 97 | "body_r1",
|
| 98 | CubeListBuilder.create().texOffs(0, 15).addBox(-4.02F, -6.116F, -3.5F, 8.0F, 6.0F, 6.0F, new CubeDeformation(0.0F)),
|
| 99 | PartPose.offsetAndRotation(1.1F, 0.1F, 0.7F, 0.1204F, -0.0064F, -0.0779F)
|
| 100 | );
|
| 101 | body.addOrReplaceChild(
|
| 102 | "head",
|
| 103 | CubeListBuilder.create()
|
| 104 | .texOffs(0, 0)
|
| 105 | .addBox(-4.0F, -5.1F, -5.0F, 8.0F, 5.0F, 10.0F, new CubeDeformation(0.0F))
|
| 106 | .texOffs(56, 0)
|
| 107 | .addBox(-1.02F, -2.1F, -6.0F, 2.0F, 3.0F, 2.0F, new CubeDeformation(0.0F))
|
| 108 | .texOffs(37, 8)
|
| 109 | .addBox(-1.02F, -9.1F, -1.0F, 2.0F, 4.0F, 2.0F, new CubeDeformation(-0.015F))
|
| 110 | .texOffs(37, 0)
|
| 111 | .addBox(-2.0F, -13.1F, -2.0F, 4.0F, 4.0F, 4.0F, new CubeDeformation(-0.015F)),
|
| 112 | PartPose.offset(0.7F, -5.6F, -1.8F)
|
| 113 | );
|
| 114 | PartDefinition right_arm = body.addOrReplaceChild("right_arm", CubeListBuilder.create(), PartPose.offset(-4.0F, -6.0F, 0.0F));
|
| 115 | right_arm.addOrReplaceChild(
|
| 116 | "right_arm_r1",
|
| 117 | CubeListBuilder.create().texOffs(36, 16).addBox(-3.052F, -1.11F, -2.036F, 3.0F, 10.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 118 | PartPose.offsetAndRotation(0.7F, -0.248F, -1.62F, 1.0036F, 0.0F, 0.0F)
|
| 119 | );
|
| 120 | PartDefinition left_arm = body.addOrReplaceChild("left_arm", CubeListBuilder.create(), PartPose.offset(4.0F, -6.0F, 0.0F));
|
| 121 | left_arm.addOrReplaceChild(
|
| 122 | "left_arm_r1",
|
| 123 | CubeListBuilder.create().texOffs(50, 16).addBox(0.032F, -1.1F, -2.0F, 3.0F, 10.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 124 | PartPose.offsetAndRotation(0.732F, 0.0F, 0.0F, -0.8715F, -0.0535F, -0.0449F)
|
| 125 | );
|
| 126 | PartDefinition right_leg = root.addOrReplaceChild("right_leg", CubeListBuilder.create(), PartPose.offset(-3.064F, -5.0F, 0.0F));
|
| 127 | right_leg.addOrReplaceChild(
|
| 128 | "right_leg_r1",
|
| 129 | CubeListBuilder.create().texOffs(0, 27).addBox(-1.856F, -0.1F, -1.09F, 4.0F, 5.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 130 | PartPose.offsetAndRotation(1.048F, 0.0F, -0.9F, -0.8727F, 0.0F, 0.0F)
|
| 131 | );
|
| 132 | PartDefinition left_leg = root.addOrReplaceChild("left_leg", CubeListBuilder.create(), PartPose.offset(0.936F, -5.0F, 0.0F));
|
| 133 | left_leg.addOrReplaceChild(
|
| 134 | "left_leg_r1",
|
| 135 | CubeListBuilder.create().texOffs(16, 27).addBox(-2.088F, -0.1F, -2.0F, 4.0F, 5.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 136 | PartPose.offsetAndRotation(1.0F, 0.0F, 0.0F, 0.7854F, 0.0F, 0.0F)
|
| 137 | );
|
| 138 | return LayerDefinition.create(meshDefinition, 64, 64);
|
| 139 | }
|
| 140 |
|
| 141 | public static LayerDefinition createSittingPoseBodyLayer() {
|
| 142 | MeshDefinition meshDefinition = new MeshDefinition().transformed(p -> p.translated(0.0F, 0.0F, 0.0F));
|
| 143 | PartDefinition root = meshDefinition.getRoot();
|
| 144 | PartDefinition body = root.addOrReplaceChild(
|
| 145 | "body",
|
| 146 | CubeListBuilder.create()
|
| 147 | .texOffs(3, 19)
|
| 148 | .addBox(-3.0F, -4.0F, -4.525F, 6.0F, 1.0F, 6.0F, new CubeDeformation(0.0F))
|
| 149 | .texOffs(0, 15)
|
| 150 | .addBox(-4.0F, -3.0F, -3.525F, 8.0F, 6.0F, 6.0F, new CubeDeformation(0.0F)),
|
| 151 | PartPose.offset(0.0F, -3.0F, 2.325F)
|
| 152 | );
|
| 153 | body.addOrReplaceChild(
|
| 154 | "body_r1",
|
| 155 | CubeListBuilder.create().texOffs(3, 18).addBox(-4.0F, -3.0F, -2.2F, 8.0F, 6.0F, 3.0F, new CubeDeformation(0.0F)),
|
| 156 | PartPose.offsetAndRotation(0.0F, -1.0F, -4.325F, 0.0F, 0.0F, -3.1416F)
|
| 157 | );
|
| 158 | PartDefinition head = body.addOrReplaceChild(
|
| 159 | "head",
|
| 160 | CubeListBuilder.create()
|
| 161 | .texOffs(37, 8)
|
| 162 | .addBox(-1.0F, -7.0F, -3.3F, 2.0F, 4.0F, 2.0F, new CubeDeformation(-0.015F))
|
| 163 | .texOffs(37, 0)
|
| 164 | .addBox(-2.0F, -11.0F, -4.3F, 4.0F, 4.0F, 4.0F, new CubeDeformation(-0.015F))
|
| 165 | .texOffs(0, 0)
|
| 166 | .addBox(-4.0F, -3.0F, -7.325F, 8.0F, 5.0F, 10.0F, new CubeDeformation(0.0F))
|
| 167 | .texOffs(56, 0)
|
| 168 | .addBox(-1.0F, 0.0F, -8.325F, 2.0F, 3.0F, 2.0F, new CubeDeformation(0.0F)),
|
| 169 | PartPose.offset(0.0F, -6.0F, -0.2F)
|
| 170 | );
|
| 171 | PartDefinition right_arm = body.addOrReplaceChild("right_arm", CubeListBuilder.create(), PartPose.offsetAndRotation(-4.0F, -5.6F, -1.8F, 0.4363F, 0.0F, 0.0F));
|
| 172 | right_arm.addOrReplaceChild(
|
| 173 | "right_arm_r1",
|
| 174 | CubeListBuilder.create().texOffs(36, 16).addBox(-3.075F, -0.9733F, -1.9966F, 3.0F, 10.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 175 | PartPose.offsetAndRotation(0.0F, 0.0893F, 0.1198F, -1.0472F, 0.0F, 0.0F)
|
| 176 | );
|
| 177 | PartDefinition left_arm = body.addOrReplaceChild("left_arm", CubeListBuilder.create(), PartPose.offsetAndRotation(4.0F, -5.6F, -1.7F, 0.4363F, 0.0F, 0.0F));
|
| 178 | left_arm.addOrReplaceChild(
|
| 179 | "left_arm_r1",
|
| 180 | CubeListBuilder.create().texOffs(50, 16).addBox(0.075F, -1.0443F, -1.8997F, 3.0F, 10.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 181 | PartPose.offsetAndRotation(0.0F, -0.0015F, -0.0808F, -1.0472F, 0.0F, 0.0F)
|
| 182 | );
|
| 183 | PartDefinition right_leg = root.addOrReplaceChild("right_leg", CubeListBuilder.create(), PartPose.offset(-2.1F, -2.1F, -2.075F));
|
| 184 | right_leg.addOrReplaceChild(
|
| 185 | "right_leg_r1",
|
| 186 | CubeListBuilder.create().texOffs(0, 27).addBox(-2.0F, 0.975F, 0.0F, 4.0F, 5.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 187 | PartPose.offsetAndRotation(0.05F, -1.9F, 1.075F, -1.5708F, 0.0F, 0.0F)
|
| 188 | );
|
| 189 | PartDefinition left_leg = root.addOrReplaceChild("left_leg", CubeListBuilder.create(), PartPose.offset(2.0F, -2.0F, -2.075F));
|
| 190 | left_leg.addOrReplaceChild(
|
| 191 | "left_leg_r1",
|
| 192 | CubeListBuilder.create().texOffs(16, 27).addBox(-2.0F, 0.975F, 0.0F, 4.0F, 5.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 193 | PartPose.offsetAndRotation(0.05F, -2.0F, 1.075F, -1.5708F, 0.0F, 0.0F)
|
| 194 | );
|
| 195 | return LayerDefinition.create(meshDefinition, 64, 64);
|
| 196 | }
|
| 197 |
|
| 198 | public static LayerDefinition createStarPoseBodyLayer() {
|
| 199 | MeshDefinition meshDefinition = new MeshDefinition().transformed(p -> p.translated(0.0F, 0.0F, 0.0F));
|
| 200 | PartDefinition root = meshDefinition.getRoot();
|
| 201 | PartDefinition body = root.addOrReplaceChild(
|
| 202 | "body", CubeListBuilder.create().texOffs(0, 15).addBox(-4.0F, -6.0F, -3.0F, 8.0F, 6.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, -5.0F, 0.0F)
|
| 203 | );
|
| 204 | body.addOrReplaceChild(
|
| 205 | "head",
|
| 206 | CubeListBuilder.create()
|
| 207 | .texOffs(0, 0)
|
| 208 | .addBox(-4.0F, -5.0F, -5.0F, 8.0F, 5.0F, 10.0F, new CubeDeformation(0.0F))
|
| 209 | .texOffs(56, 0)
|
| 210 | .addBox(-1.0F, -2.0F, -6.0F, 2.0F, 3.0F, 2.0F, new CubeDeformation(0.0F))
|
| 211 | .texOffs(37, 8)
|
| 212 | .addBox(-1.0F, -9.0F, -1.0F, 2.0F, 4.0F, 2.0F, new CubeDeformation(-0.015F))
|
| 213 | .texOffs(37, 0)
|
| 214 | .addBox(-2.0F, -13.0F, -2.0F, 4.0F, 4.0F, 4.0F, new CubeDeformation(-0.015F)),
|
| 215 | PartPose.offset(0.0F, -6.0F, 0.0F)
|
| 216 | );
|
| 217 | PartDefinition right_arm = body.addOrReplaceChild("right_arm", CubeListBuilder.create(), PartPose.offset(-4.0F, -6.0F, 0.0F));
|
| 218 | right_arm.addOrReplaceChild(
|
| 219 | "right_arm_r1",
|
| 220 | CubeListBuilder.create().texOffs(36, 16).addBox(-1.5F, -5.0F, -2.0F, 3.0F, 10.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 221 | PartPose.offsetAndRotation(1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 1.9199F)
|
| 222 | );
|
| 223 | right_arm.addOrReplaceChild("rightItem", CubeListBuilder.create(), PartPose.offset(-1.0F, 7.4F, -1.0F));
|
| 224 | PartDefinition left_arm = body.addOrReplaceChild("left_arm", CubeListBuilder.create(), PartPose.offset(4.0F, -6.0F, 0.0F));
|
| 225 | left_arm.addOrReplaceChild(
|
| 226 | "left_arm_r1",
|
| 227 | CubeListBuilder.create().texOffs(50, 16).addBox(-1.5F, -5.0F, -2.0F, 3.0F, 10.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 228 | PartPose.offsetAndRotation(-1.0F, 1.0F, 0.0F, 0.0F, 0.0F, -1.9199F)
|
| 229 | );
|
| 230 | PartDefinition right_leg = root.addOrReplaceChild("right_leg", CubeListBuilder.create(), PartPose.offset(-3.0F, -5.0F, 0.0F));
|
| 231 | right_leg.addOrReplaceChild(
|
| 232 | "right_leg_r1",
|
| 233 | CubeListBuilder.create().texOffs(0, 27).addBox(-2.0F, -2.5F, -2.0F, 4.0F, 5.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 234 | PartPose.offsetAndRotation(0.35F, 2.0F, 0.01F, 0.0F, 0.0F, 0.2618F)
|
| 235 | );
|
| 236 | PartDefinition left_leg = root.addOrReplaceChild("left_leg", CubeListBuilder.create(), PartPose.offset(1.0F, -5.0F, 0.0F));
|
| 237 | left_leg.addOrReplaceChild(
|
| 238 | "left_leg_r1",
|
| 239 | CubeListBuilder.create().texOffs(16, 27).addBox(-2.0F, -2.5F, -2.0F, 4.0F, 5.0F, 4.0F, new CubeDeformation(0.0F)),
|
| 240 | PartPose.offsetAndRotation(1.65F, 2.0F, 0.0F, 0.0F, 0.0F, -0.2618F)
|
| 241 | );
|
| 242 | return LayerDefinition.create(meshDefinition, 64, 64);
|
| 243 | }
|
| 244 |
|
| 245 | public static LayerDefinition createEyesLayer() {
|
| 246 | return createBodyLayer().apply(mesh -> {
|
| 247 | mesh.getRoot().retainPartsAndChildren(Set.of("eyes"));
|
| 248 | return mesh;
|
| 249 | });
|
| 250 | }
|
| 251 |
|
| 252 | public void setupAnim(final CopperGolemRenderState state) {
|
| 253 | super.setupAnim(state);
|
| 254 | this.head.xRot = state.xRot * (float) (Math.PI / 180.0);
|
| 255 | this.head.yRot = state.yRot * (float) (Math.PI / 180.0);
|
| 256 | if (state.rightHandItemState.isEmpty() && state.leftHandItemState.isEmpty()) {
|
| 257 | this.walkAnimation.applyWalk(state.walkAnimationPos, state.walkAnimationSpeed, 2.0F, 2.5F);
|
| 258 | } else {
|
| 259 | this.walkWithItemAnimation.applyWalk(state.walkAnimationPos, state.walkAnimationSpeed, 2.0F, 2.5F);
|
| 260 | this.poseHeldItemArmsIfStill();
|
| 261 | }
|
| 262 |
|
| 263 | this.idleAnimation.apply(state.idleAnimationState, state.ageInTicks);
|
| 264 | this.interactionGetItem.apply(state.interactionGetItem, state.ageInTicks);
|
| 265 | this.interactionGetNoItem.apply(state.interactionGetNoItem, state.ageInTicks);
|
| 266 | this.interactionDropItem.apply(state.interactionDropItem, state.ageInTicks);
|
| 267 | this.interactionDropNoItem.apply(state.interactionDropNoItem, state.ageInTicks);
|
| 268 | }
|
| 269 |
|
| 270 | public void translateToHand(final CopperGolemRenderState state, final HumanoidArm arm, final PoseStack poseStack) {
|
| 271 | this.root.translateAndRotate(poseStack);
|
| 272 | this.body.translateAndRotate(poseStack);
|
| 273 | ModelPart activeArm = arm == HumanoidArm.RIGHT ? this.rightArm : this.leftArm;
|
| 274 | activeArm.translateAndRotate(poseStack);
|
| 275 | if (state.copperGolemState.equals(CopperGolemState.IDLE)) {
|
| 276 | poseStack.rotateDegrees(Axis.YP, arm == HumanoidArm.RIGHT ? -90.0F : 90.0F);
|
| 277 | poseStack.translate(0.0F, 0.0F, 0.125F);
|
| 278 | } else {
|
| 279 | poseStack.scale(0.55F, 0.55F, 0.55F);
|
| 280 | poseStack.translate(-0.125F, 0.3125F, -0.1875F);
|
| 281 | }
|
| 282 | }
|
| 283 |
|
| 284 | @Override
|
| 285 | public ModelPart getHead() {
|
| 286 | return this.head;
|
| 287 | }
|
| 288 |
|
| 289 | @Override
|
| 290 | public void translateToHead(final PoseStack poseStack) {
|
| 291 | this.body.translateAndRotate(poseStack);
|
| 292 | this.head.translateAndRotate(poseStack);
|
| 293 | poseStack.translate(0.0F, 0.125F, 0.0F);
|
| 294 | poseStack.scale(1.0625F, 1.0625F, 1.0625F);
|
| 295 | }
|
| 296 |
|
| 297 | public void applyBlockOnAntennaTransform(final PoseStack poseStack) {
|
| 298 | this.root.translateAndRotate(poseStack);
|
| 299 | this.body.translateAndRotate(poseStack);
|
| 300 | this.head.translateAndRotate(poseStack);
|
| 301 | poseStack.translate(0.0, -1.75, 0.0);
|
| 302 | }
|
| 303 |
|
| 304 | private void poseHeldItemArmsIfStill() {
|
| 305 | this.rightArm.xRot = Math.min(this.rightArm.xRot, -0.87266463F);
|
| 306 | this.leftArm.xRot = Math.min(this.leftArm.xRot, -0.87266463F);
|
| 307 | this.rightArm.yRot = Math.min(this.rightArm.yRot, -0.1134464F);
|
| 308 | this.leftArm.yRot = Math.max(this.leftArm.yRot, 0.1134464F);
|
| 309 | this.rightArm.zRot = Math.min(this.rightArm.zRot, -0.064577185F);
|
| 310 | this.leftArm.zRot = Math.max(this.leftArm.zRot, 0.064577185F);
|
| 311 | }
|
| 312 | }
|
| 313 |
|