From 3268e768c11fbe20a4fdb53e4e88ee8af7831f7a Mon Sep 17 00:00:00 2001 From: TheWeatherPony Date: Thu, 9 Aug 2018 23:32:09 -0700 Subject: [PATCH] Friendlier Access Modifiers Added support for potential external usage without going through Pony.class and potential swapping of models without swapping renders. Usages/Implementations not included. --- .../com/minelittlepony/model/AbstractPonyModel.java | 10 +++++----- .../java/com/minelittlepony/pony/data/PonyData.java | 2 +- .../java/com/minelittlepony/render/RenderPony.java | 2 +- .../java/com/minelittlepony/render/RenderPonyMob.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java index b5824427..6662964c 100644 --- a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java +++ b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java @@ -33,11 +33,11 @@ import static com.minelittlepony.model.PonyModelConstants.*; */ public abstract class AbstractPonyModel extends ModelPlayer implements IModel { - private boolean isSleeping; - private boolean isFlying; - private boolean isElytraFlying; - private boolean isSwimming; - private boolean headGear; + public boolean isSleeping; + public boolean isFlying; + public boolean isElytraFlying; + public boolean isSwimming; + public boolean headGear; /** * Associcated pony data. diff --git a/src/main/java/com/minelittlepony/pony/data/PonyData.java b/src/main/java/com/minelittlepony/pony/data/PonyData.java index 46accf3a..6cdbb674 100644 --- a/src/main/java/com/minelittlepony/pony/data/PonyData.java +++ b/src/main/java/com/minelittlepony/pony/data/PonyData.java @@ -100,7 +100,7 @@ public class PonyData implements IPonyData { /** * Parses an image buffer into a new IPonyData representing the values stored in it's individual trigger pixels. */ - static IPonyData parse(BufferedImage image) { + public static IPonyData parse(BufferedImage image) { return new PonyData(image); } } diff --git a/src/main/java/com/minelittlepony/render/RenderPony.java b/src/main/java/com/minelittlepony/render/RenderPony.java index 014b61f6..dde12aa1 100644 --- a/src/main/java/com/minelittlepony/render/RenderPony.java +++ b/src/main/java/com/minelittlepony/render/RenderPony.java @@ -13,7 +13,7 @@ public class RenderPony { public ModelWrapper playerModel; - private AbstractPonyModel ponyModel; + protected AbstractPonyModel ponyModel; private Pony pony; diff --git a/src/main/java/com/minelittlepony/render/RenderPonyMob.java b/src/main/java/com/minelittlepony/render/RenderPonyMob.java index e68b7059..e07ddf75 100644 --- a/src/main/java/com/minelittlepony/render/RenderPonyMob.java +++ b/src/main/java/com/minelittlepony/render/RenderPonyMob.java @@ -24,7 +24,7 @@ import javax.annotation.Nonnull; // and is the whole reason we had this scaling bug in the first place. public abstract class RenderPonyMob extends RenderLiving implements IRenderPony { - protected final RenderPony renderPony = new RenderPony(this); + protected RenderPony renderPony = new RenderPony(this); public RenderPonyMob(RenderManager manager, ModelWrapper model) { super(manager, model.getBody(), 0.5F);