From e6578653059110512b3e39f62df2ea1809b6e95d Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 21 Jun 2018 23:53:32 +0200 Subject: [PATCH] Move normal transforms into its own method --- .../model/AbstractPonyModel.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java index f1cb06c0..317e9277 100644 --- a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java +++ b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java @@ -778,17 +778,21 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel { } else if (metadata.getSize() == PonySize.TALL) { transformTall(part); } else { - if (isSleeping) translate(0, -0.61F, 0.25F); - - switch (part) { - case NECK: - if (isCrouching()) translate(-0.03F, 0.03F, 0.1F); - default: - } + transformNormal(part); } } + private void transformNormal(BodyPart part) { + if (isSleeping) translate(0, -0.61F, 0.25F); + + switch (part) { + case NECK: + if (isCrouching()) translate(-0.03F, 0.03F, 0.1F); + default: + } + } + private void transformTall(BodyPart part) { if (isSleeping) translate(0, -0.5F, 0.25F);