minor bugfix + stocky bodytype

- added stocky bodytype with the trigger pixel of #b2e7dd
- fixed [this issue mentioned here](https://github.com/MineLittlePony/MineLittlePony/issues/289)
This commit is contained in:
SKL 2024-11-06 01:03:31 -05:00
parent c8709ea1b8
commit 77fe8b75a9
3 changed files with 39 additions and 3 deletions

View file

@ -175,4 +175,4 @@ publishing {
}
}
}
}
}

View file

@ -16,6 +16,7 @@ public enum SizePreset implements Size {
NORMAL (0x000000, 0.4f, 0.8F, 0.8F),
YEARLING(0x53beff, 0.4F, 0.6F, 0.65F),
FOAL (0xffbe53, 0.25f, 0.6F, 0.5F),
STOCKY (0xb2e7dd, 0.45F, 0.8F, 0.8F),
UNSET (0x000000, 1, 1, 1);
private final int triggerValue;

View file

@ -29,8 +29,8 @@ public enum PonyTransformation {
if (model.getAttributes().isCrouching) stack.translate(-0.03F, 0.03F, 0.13F);
break;
case HEAD:
if (model.getAttributes().isLyingDown) stack.translate(-0.05F, -0.05F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, 0.1F, -0);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.05F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, 0.1F, 0);
break;
case BACK:
translateForRider(stack);
@ -38,6 +38,41 @@ public enum PonyTransformation {
default:
}
}
},
STOCKY(SizePreset.STOCKY, 0, 3.2F, 0.75F) {
@Override
public void transform(PonyModel<?> model, BodyPart part, MatrixStack stack) {
if (model.getAttributes().isSwimming) stack.translate(0, -0.3F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, -0.2F, 0);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.77F, 0.1F);
if (model.getAttributes().isSleeping) stack.translate(0, 0.16F, 0);
if (model.getAttributes().isSitting) stack.translate(0, -0.2F, -0.2F);
switch (part) {
case NECK:
stack.scale(1.4F, 1, 1.2F);
if (model.getAttributes().isCrouching) stack.translate(-0.03F, 0.03F, 0.13F);
break;
case HEAD:
if (model.getAttributes().isLyingDown) stack.translate(0, -0.05F, 0);
if (model.getAttributes().isCrouching) stack.translate(0, 0.1F, 0);
break;
case BODY:
stack.translate(0, -0.1F, -0.05F);
if (model.getAttributes().isCrouching) stack.translate(0, -0.07F, 0.04F);
if (model.getAttributes().isLyingDown) stack.translate(0, -0.1F, 0);
stack.scale(1.4F, 1.3F, 1.1F);
break;
case LEGS:
stack.translate(0, 0, -0.1F);
if (model.getAttributes().isCrouching) stack.translate(0, 0, 0.1F);
stack.scale(1.1F, 1, 1.1F);
break;
case BACK:
translateForRider(stack);
break;
}
}
},
LANKY(SizePreset.LANKY, 0, 2.6F, 0.75F) {
@Override