From f66f78693f1664c8890eead089d08bf89af7e660 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 20 Oct 2018 19:09:58 +0200 Subject: [PATCH] Rename LARGE -> BULKY and added a LANKY body type (used for Fleur) --- .../model/AbstractPonyModel.java | 2 +- .../minelittlepony/pony/data/PonySize.java | 3 +- .../transform/PonyTransformation.java | 36 ++++++++++++++++++- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java index db7f154e..704e5d46 100644 --- a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java +++ b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java @@ -782,7 +782,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P case NORMAL: return 0.4F; case FOAL: case TALL: - case LARGE: + case BULKY: default: return 0.25F; } } diff --git a/src/main/java/com/minelittlepony/pony/data/PonySize.java b/src/main/java/com/minelittlepony/pony/data/PonySize.java index 38b08264..cc7bf6af 100644 --- a/src/main/java/com/minelittlepony/pony/data/PonySize.java +++ b/src/main/java/com/minelittlepony/pony/data/PonySize.java @@ -5,7 +5,8 @@ import com.minelittlepony.transform.PonyTransformation; public enum PonySize implements ITriggerPixelMapped { TALL(0x534b76, 0.45f, 1.1F, PonyTransformation.TALL), - LARGE(0xce3254, 0.5f, 1, PonyTransformation.LARGE), + BULKY(0xce3254, 0.5f, 1, PonyTransformation.BULKY), + LANKY(0x3254ce, 0.45F, 0.85F, PonyTransformation.LANKY), NORMAL(0, 0.4f, 0.8F, PonyTransformation.NORMAL), YEARLING(0x53beff, 0.4F, 0.6F, PonyTransformation.YEARLING), FOAL(0xffbe53, 0.25f, 0.6F, PonyTransformation.FOAL); diff --git a/src/main/java/com/minelittlepony/transform/PonyTransformation.java b/src/main/java/com/minelittlepony/transform/PonyTransformation.java index eaf780ea..dd6b7bb4 100644 --- a/src/main/java/com/minelittlepony/transform/PonyTransformation.java +++ b/src/main/java/com/minelittlepony/transform/PonyTransformation.java @@ -31,7 +31,41 @@ public enum PonyTransformation { } } }, - LARGE(0, 2.3F, 0.3F) { + LANKY(0, 2.3F, 0.3F) { + @Override + public void transform(IModel model, BodyPart part) { + if (model.isCrouching()) translate(0, -0.15F, 0); + if (model.isSleeping()) translate(0, -0.98F, 0.2F); + if (model.isRiding()) translate(0, 0, -0.2F); + + switch (part) { + case NECK: + translate(0, -0.15F, -0.07F); + if (model.isCrouching()) translate(-0.03F, 0.16F, 0.07F); + break; + case HEAD: + translate(0, -0.17F, -0.04F); + if (model.isSleeping()) translate(0, 0, -0.1F); + if (model.isCrouching()) translate(0, 0.15F, 0); + break; + case BODY: + translate(0, -0.2F, -0.04F); + scale(0.9F, 1.2F, 0.9F); + break; + case TAIL: + translate(0, -0.2F, 0.08F); + break; + case LEGS: + translate(0, -0.18F, 0); + scale(0.9F, 1.12F, 0.9F); + break; + case BACK: + translateVec(riderOffset); + break; + } + } + }, + BULKY(0, 2.3F, 0.3F) { @Override public void transform(IModel model, BodyPart part) { if (model.isCrouching()) translate(0, -0.15F, 0);