mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Fix head positioning and move neck dilation to the model json
This commit is contained in:
parent
787a24280a
commit
c320087934
4 changed files with 9 additions and 11 deletions
|
@ -64,6 +64,8 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
super.setAngles(entity, move, swing, ticks, headYaw, headPitch);
|
||||
|
||||
head.pivotY = head.getDefaultTransform().pivotY;
|
||||
head.pivotX = head.getDefaultTransform().pivotX;
|
||||
head.pivotZ = head.getDefaultTransform().pivotZ;
|
||||
|
||||
setModelAngles(entity, move, swing, ticks, headYaw, headPitch);
|
||||
|
||||
|
@ -570,7 +572,6 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
}
|
||||
|
||||
protected void renderNeck(MatrixStack stack, VertexConsumer vertices, int overlayUv, int lightUv, float red, float green, float blue, float alpha) {
|
||||
stack.scale(0.9F, 0.9F, 0.9F);
|
||||
neck.render(stack, vertices, overlayUv, lightUv, red, green, blue, alpha);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.minelittlepony.client.render.entity.npc;
|
||||
|
||||
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.passive.MerchantEntity;
|
||||
import net.minecraft.entity.passive.VillagerEntity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
|
|
@ -26,7 +26,6 @@ public enum PonyTransformation {
|
|||
if (model.getAttributes().isCrouching) stack.translate(-0.03F, 0.03F, 0.1F);
|
||||
break;
|
||||
case HEAD:
|
||||
stack.translate(0, 0, 0.1F);
|
||||
if (model.getAttributes().isCrouching) stack.translate(0, 0.1F, 0);
|
||||
if (model.getAttributes().isSwimmingRotated) stack.translate(0, 0.37F, 0.45F);
|
||||
break;
|
||||
|
@ -53,7 +52,7 @@ public enum PonyTransformation {
|
|||
if (model.getAttributes().isSwimmingRotated) stack.translate(0, 0.5F, 0.25F);
|
||||
break;
|
||||
case HEAD:
|
||||
stack.translate(0, -0.14F, 0.02F);
|
||||
stack.translate(0, -0.14F, -0.04F);
|
||||
if (model.getAttributes().isSleeping) stack.translate(0, 0, -0.1F);
|
||||
if (model.getAttributes().isCrouching) stack.translate(0, 0.15F, 0);
|
||||
if (model.getAttributes().isSwimmingRotated) stack.translate(0, 0.45F, 0.45F);
|
||||
|
@ -90,7 +89,7 @@ public enum PonyTransformation {
|
|||
if (model.getAttributes().isSwimmingRotated) stack.translate(0, 0.5F, 0.25F);
|
||||
break;
|
||||
case HEAD:
|
||||
stack.translate(0, -0.14F, 0.01F);
|
||||
stack.translate(0, -0.14F, -0.06F);
|
||||
if (model.getAttributes().isSleeping) stack.translate(0, 0, -0.1F);
|
||||
if (model.getAttributes().isCrouching) stack.translate(0, 0.15F, 0);
|
||||
if (model.getAttributes().isSwimmingRotated) stack.translate(0, 0.15F, 0.25F);
|
||||
|
@ -129,7 +128,6 @@ public enum PonyTransformation {
|
|||
if (model.getAttributes().isCrouching) stack.translate(0, -0.01F, 0.15F);
|
||||
break;
|
||||
case HEAD:
|
||||
stack.translate(0, 0, 0.16F);
|
||||
if (model.getAttributes().isSwimmingRotated) stack.translate(0, 0.9F, 0.9F);
|
||||
stack.scale(1.3F, 1.3F, 1.3F);
|
||||
break;
|
||||
|
@ -158,7 +156,7 @@ public enum PonyTransformation {
|
|||
if (model.getAttributes().isCrouching) stack.translate(-0.02F, -0.02F, 0.1F);
|
||||
break;
|
||||
case HEAD:
|
||||
stack.translate(0, -0.11F, 0.095F);
|
||||
stack.translate(0, -0.11F, 0);
|
||||
if (model.getAttributes().isCrouching) stack.translate(0, 0.04F, 0);
|
||||
if (model.getAttributes().isSwimmingRotated) stack.translate(0, 0.17F, 0.25F);
|
||||
break;
|
||||
|
@ -188,12 +186,12 @@ public enum PonyTransformation {
|
|||
|
||||
switch (part) {
|
||||
case NECK:
|
||||
stack.translate(0, -0.2F, -0.01F);
|
||||
stack.translate(0, -0.2F, 0);
|
||||
stack.scale(1, 1.3F, 1);
|
||||
if (model.getAttributes().isCrouching) stack.translate(-0.02F, -0.02F, 0.1F);
|
||||
break;
|
||||
case HEAD:
|
||||
stack.translate(0, -0.15F, 0.1F);
|
||||
stack.translate(0, -0.15F, 0);
|
||||
if (model.getAttributes().isCrouching) stack.translate(0, 0.04F, 0);
|
||||
if (model.getAttributes().isSwimmingRotated) stack.translate(0, 0.8F, 0.85F);
|
||||
stack.scale(1.15F, 1.15F, 1.15F);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"arm_rotation_x_neg": [0, "-", "#arm_rotation_x"],
|
||||
"arm_rotation_y": 8,
|
||||
"head_pivot_y": 0,
|
||||
"neck_dilate_y": 0
|
||||
"neck_dilate_y": -0.1
|
||||
},
|
||||
"skeleton": {
|
||||
"upper_torso": {
|
||||
|
@ -175,7 +175,7 @@
|
|||
},
|
||||
"neck": {
|
||||
"type": "mson:planar",
|
||||
"dilate": [ 0, "#neck_dilate_y", 0 ],
|
||||
"dilate": [ -0.3, "#neck_dilate_y", -0.3 ],
|
||||
"texture": { "u": 0, "v": 16 },
|
||||
"rotate": [9, 0, 0],
|
||||
"north": [-2, 1.199998, -2.8, 4, 4],
|
||||
|
|
Loading…
Reference in a new issue