From 403c1950073d06543f8de6f481f6d627188e6a64 Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 25 Apr 2018 13:02:10 +0200 Subject: [PATCH] Time to tackle packages (phase 1: separate the data from all the other carp) --- src/main/java/com/minelittlepony/MineLittlePony.java | 2 ++ src/main/java/com/minelittlepony/PonyConfig.java | 1 + src/main/java/com/minelittlepony/PonyManager.java | 2 ++ src/main/java/com/minelittlepony/ducks/IPlayerInfo.java | 2 +- src/main/java/com/minelittlepony/gui/PonySettingPanel.java | 2 +- .../com/minelittlepony/hdskins/gui/RenderPonyModel.java | 2 +- .../com/minelittlepony/mixin/MixinNetworkPlayerInfo.java | 2 +- src/main/java/com/minelittlepony/model/AbstractArmor.java | 2 +- .../java/com/minelittlepony/model/AbstractPonyModel.java | 6 +++--- src/main/java/com/minelittlepony/model/PlayerModel.java | 2 +- .../java/com/minelittlepony/model/components/PonySnout.java | 2 +- .../java/com/minelittlepony/model/components/PonyTail.java | 3 ++- .../java/com/minelittlepony/{ => pony/data}/IPonyData.java | 2 +- src/main/java/com/minelittlepony/{ => pony/data}/Pony.java | 3 ++- .../java/com/minelittlepony/{ => pony/data}/PonyData.java | 4 ++-- .../minelittlepony/{ => pony/data}/PonyDataSerialzier.java | 2 +- .../java/com/minelittlepony/{ => pony/data}/PonyGender.java | 4 +--- .../java/com/minelittlepony/{ => pony/data}/PonyLevel.java | 2 +- .../java/com/minelittlepony/{ => pony/data}/PonyRace.java | 3 +-- .../java/com/minelittlepony/{ => pony/data}/PonySize.java | 4 +--- .../com/minelittlepony/{ => pony/data}/TailLengths.java | 4 +--- .../java/com/minelittlepony/pony/data/TriggerPixels.java | 5 ----- .../minelittlepony/renderer/layer/LayerHeldPonyItem.java | 2 +- .../com/minelittlepony/renderer/player/RenderPonyBase.java | 2 +- 24 files changed, 30 insertions(+), 35 deletions(-) rename src/main/java/com/minelittlepony/{ => pony/data}/IPonyData.java (89%) rename src/main/java/com/minelittlepony/{ => pony/data}/Pony.java (98%) rename src/main/java/com/minelittlepony/{ => pony/data}/PonyData.java (96%) rename src/main/java/com/minelittlepony/{ => pony/data}/PonyDataSerialzier.java (94%) rename src/main/java/com/minelittlepony/{ => pony/data}/PonyGender.java (77%) rename src/main/java/com/minelittlepony/{ => pony/data}/PonyLevel.java (61%) rename src/main/java/com/minelittlepony/{ => pony/data}/PonyRace.java (94%) rename src/main/java/com/minelittlepony/{ => pony/data}/PonySize.java (87%) rename src/main/java/com/minelittlepony/{ => pony/data}/TailLengths.java (81%) diff --git a/src/main/java/com/minelittlepony/MineLittlePony.java b/src/main/java/com/minelittlepony/MineLittlePony.java index 1116b9f0..326372bd 100644 --- a/src/main/java/com/minelittlepony/MineLittlePony.java +++ b/src/main/java/com/minelittlepony/MineLittlePony.java @@ -4,6 +4,8 @@ import com.google.common.collect.Maps; import com.minelittlepony.gui.PonySettingPanel; import com.minelittlepony.hdskins.gui.GuiSkinsMineLP; import com.minelittlepony.model.PMAPI; +import com.minelittlepony.pony.data.IPonyData; +import com.minelittlepony.pony.data.PonyDataSerialzier; import com.minelittlepony.renderer.RenderPonyEvoker; import com.minelittlepony.renderer.RenderPonyIllusionIllager; import com.minelittlepony.renderer.RenderPonyPigman; diff --git a/src/main/java/com/minelittlepony/PonyConfig.java b/src/main/java/com/minelittlepony/PonyConfig.java index db8ff1dd..ac76072a 100644 --- a/src/main/java/com/minelittlepony/PonyConfig.java +++ b/src/main/java/com/minelittlepony/PonyConfig.java @@ -1,6 +1,7 @@ package com.minelittlepony; import com.google.gson.annotations.Expose; +import com.minelittlepony.pony.data.PonyLevel; import com.mumfrey.liteloader.modconfig.ConfigStrategy; import com.mumfrey.liteloader.modconfig.Exposable; import com.mumfrey.liteloader.modconfig.ExposableOptions; diff --git a/src/main/java/com/minelittlepony/PonyManager.java b/src/main/java/com/minelittlepony/PonyManager.java index 909ddb6f..bfddf206 100644 --- a/src/main/java/com/minelittlepony/PonyManager.java +++ b/src/main/java/com/minelittlepony/PonyManager.java @@ -6,6 +6,8 @@ import com.google.gson.Gson; import com.google.gson.JsonParseException; import com.minelittlepony.ducks.IPlayerInfo; import com.minelittlepony.model.PMAPI; +import com.minelittlepony.pony.data.Pony; +import com.minelittlepony.pony.data.PonyLevel; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.resources.DefaultPlayerSkin; diff --git a/src/main/java/com/minelittlepony/ducks/IPlayerInfo.java b/src/main/java/com/minelittlepony/ducks/IPlayerInfo.java index 2a6a0df5..f2d62f55 100644 --- a/src/main/java/com/minelittlepony/ducks/IPlayerInfo.java +++ b/src/main/java/com/minelittlepony/ducks/IPlayerInfo.java @@ -1,6 +1,6 @@ package com.minelittlepony.ducks; -import com.minelittlepony.Pony; +import com.minelittlepony.pony.data.Pony; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.AbstractClientPlayer; diff --git a/src/main/java/com/minelittlepony/gui/PonySettingPanel.java b/src/main/java/com/minelittlepony/gui/PonySettingPanel.java index f7745153..217d1f44 100644 --- a/src/main/java/com/minelittlepony/gui/PonySettingPanel.java +++ b/src/main/java/com/minelittlepony/gui/PonySettingPanel.java @@ -2,7 +2,7 @@ package com.minelittlepony.gui; import com.minelittlepony.MineLittlePony; import com.minelittlepony.PonyConfig; -import com.minelittlepony.PonyLevel; +import com.minelittlepony.pony.data.PonyLevel; import com.mumfrey.liteloader.client.gui.GuiCheckbox; import com.mumfrey.liteloader.core.LiteLoader; import net.minecraft.client.gui.GuiButton; diff --git a/src/main/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java b/src/main/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java index 5499409b..021f737b 100644 --- a/src/main/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java +++ b/src/main/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java @@ -1,11 +1,11 @@ package com.minelittlepony.hdskins.gui; import com.minelittlepony.MineLittlePony; -import com.minelittlepony.Pony; import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.BodyPart; import com.minelittlepony.model.ModelPonyElytra; import com.minelittlepony.model.PlayerModel; +import com.minelittlepony.pony.data.Pony; import com.minelittlepony.renderer.layer.AbstractPonyLayer; import com.voxelmodpack.hdskins.gui.RenderPlayerModel; import net.minecraft.client.model.ModelPlayer; diff --git a/src/main/java/com/minelittlepony/mixin/MixinNetworkPlayerInfo.java b/src/main/java/com/minelittlepony/mixin/MixinNetworkPlayerInfo.java index 744e2417..89356ba0 100644 --- a/src/main/java/com/minelittlepony/mixin/MixinNetworkPlayerInfo.java +++ b/src/main/java/com/minelittlepony/mixin/MixinNetworkPlayerInfo.java @@ -7,9 +7,9 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import com.minelittlepony.MineLittlePony; -import com.minelittlepony.Pony; import com.minelittlepony.PonyManager; import com.minelittlepony.ducks.IPlayerInfo; +import com.minelittlepony.pony.data.Pony; import com.mojang.authlib.GameProfile; import net.minecraft.client.network.NetworkPlayerInfo; diff --git a/src/main/java/com/minelittlepony/model/AbstractArmor.java b/src/main/java/com/minelittlepony/model/AbstractArmor.java index 3b620665..aed2b388 100644 --- a/src/main/java/com/minelittlepony/model/AbstractArmor.java +++ b/src/main/java/com/minelittlepony/model/AbstractArmor.java @@ -1,6 +1,6 @@ package com.minelittlepony.model; -import com.minelittlepony.IPonyData; +import com.minelittlepony.pony.data.IPonyData; public abstract class AbstractArmor { diff --git a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java index 8baa53ae..cd67a436 100644 --- a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java +++ b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java @@ -1,9 +1,9 @@ package com.minelittlepony.model; -import com.minelittlepony.IPonyData; -import com.minelittlepony.PonyData; -import com.minelittlepony.PonySize; import com.minelittlepony.model.pony.ModelPlayerPony; +import com.minelittlepony.pony.data.IPonyData; +import com.minelittlepony.pony.data.PonyData; +import com.minelittlepony.pony.data.PonySize; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelPlayer; diff --git a/src/main/java/com/minelittlepony/model/PlayerModel.java b/src/main/java/com/minelittlepony/model/PlayerModel.java index a0520365..9a9e5dee 100644 --- a/src/main/java/com/minelittlepony/model/PlayerModel.java +++ b/src/main/java/com/minelittlepony/model/PlayerModel.java @@ -1,6 +1,6 @@ package com.minelittlepony.model; -import com.minelittlepony.IPonyData; +import com.minelittlepony.pony.data.IPonyData; public class PlayerModel { diff --git a/src/main/java/com/minelittlepony/model/components/PonySnout.java b/src/main/java/com/minelittlepony/model/components/PonySnout.java index d032cf83..d3067f28 100644 --- a/src/main/java/com/minelittlepony/model/components/PonySnout.java +++ b/src/main/java/com/minelittlepony/model/components/PonySnout.java @@ -1,7 +1,7 @@ package com.minelittlepony.model.components; -import com.minelittlepony.PonyGender; import com.minelittlepony.model.AbstractPonyModel; +import com.minelittlepony.pony.data.PonyGender; import com.minelittlepony.renderer.plane.PlaneRenderer; import static com.minelittlepony.model.PonyModelConstants.*; diff --git a/src/main/java/com/minelittlepony/model/components/PonyTail.java b/src/main/java/com/minelittlepony/model/components/PonyTail.java index 23a424d8..3796747a 100644 --- a/src/main/java/com/minelittlepony/model/components/PonyTail.java +++ b/src/main/java/com/minelittlepony/model/components/PonyTail.java @@ -1,6 +1,5 @@ package com.minelittlepony.model.components; -import com.minelittlepony.TailLengths; import com.minelittlepony.renderer.plane.PlaneRenderer; import net.minecraft.client.model.ModelBase; @@ -8,6 +7,8 @@ import net.minecraft.util.math.MathHelper; import static com.minelittlepony.model.PonyModelConstants.*; +import com.minelittlepony.pony.data.TailLengths; + public class PonyTail extends PlaneRenderer { private final TailSegment[] segments = new TailSegment[4]; diff --git a/src/main/java/com/minelittlepony/IPonyData.java b/src/main/java/com/minelittlepony/pony/data/IPonyData.java similarity index 89% rename from src/main/java/com/minelittlepony/IPonyData.java rename to src/main/java/com/minelittlepony/pony/data/IPonyData.java index 7698f168..f1f23d67 100644 --- a/src/main/java/com/minelittlepony/IPonyData.java +++ b/src/main/java/com/minelittlepony/pony/data/IPonyData.java @@ -1,4 +1,4 @@ -package com.minelittlepony; +package com.minelittlepony.pony.data; import net.minecraft.client.resources.data.IMetadataSection; diff --git a/src/main/java/com/minelittlepony/Pony.java b/src/main/java/com/minelittlepony/pony/data/Pony.java similarity index 98% rename from src/main/java/com/minelittlepony/Pony.java rename to src/main/java/com/minelittlepony/pony/data/Pony.java index 80d06751..1dde419c 100644 --- a/src/main/java/com/minelittlepony/Pony.java +++ b/src/main/java/com/minelittlepony/pony/data/Pony.java @@ -1,6 +1,7 @@ -package com.minelittlepony; +package com.minelittlepony.pony.data; import com.google.common.base.MoreObjects; +import com.minelittlepony.MineLittlePony; import com.minelittlepony.ducks.IDownloadImageData; import com.minelittlepony.model.PlayerModel; import com.voxelmodpack.hdskins.DynamicTextureImage; diff --git a/src/main/java/com/minelittlepony/PonyData.java b/src/main/java/com/minelittlepony/pony/data/PonyData.java similarity index 96% rename from src/main/java/com/minelittlepony/PonyData.java rename to src/main/java/com/minelittlepony/pony/data/PonyData.java index af59130c..aa5e0ea0 100644 --- a/src/main/java/com/minelittlepony/PonyData.java +++ b/src/main/java/com/minelittlepony/pony/data/PonyData.java @@ -1,7 +1,7 @@ -package com.minelittlepony; +package com.minelittlepony.pony.data; import com.google.common.base.MoreObjects; -import com.minelittlepony.pony.data.TriggerPixels; +import com.minelittlepony.MineLittlePony; import java.awt.image.BufferedImage; import javax.annotation.concurrent.Immutable; diff --git a/src/main/java/com/minelittlepony/PonyDataSerialzier.java b/src/main/java/com/minelittlepony/pony/data/PonyDataSerialzier.java similarity index 94% rename from src/main/java/com/minelittlepony/PonyDataSerialzier.java rename to src/main/java/com/minelittlepony/pony/data/PonyDataSerialzier.java index 4e3d4c4d..a3703f3e 100644 --- a/src/main/java/com/minelittlepony/PonyDataSerialzier.java +++ b/src/main/java/com/minelittlepony/pony/data/PonyDataSerialzier.java @@ -1,4 +1,4 @@ -package com.minelittlepony; +package com.minelittlepony.pony.data; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonElement; diff --git a/src/main/java/com/minelittlepony/PonyGender.java b/src/main/java/com/minelittlepony/pony/data/PonyGender.java similarity index 77% rename from src/main/java/com/minelittlepony/PonyGender.java rename to src/main/java/com/minelittlepony/pony/data/PonyGender.java index 1da3900d..f1634136 100644 --- a/src/main/java/com/minelittlepony/PonyGender.java +++ b/src/main/java/com/minelittlepony/pony/data/PonyGender.java @@ -1,6 +1,4 @@ -package com.minelittlepony; - -import com.minelittlepony.pony.data.ITriggerPixelMapped; +package com.minelittlepony.pony.data; public enum PonyGender implements ITriggerPixelMapped { MARE(0), diff --git a/src/main/java/com/minelittlepony/PonyLevel.java b/src/main/java/com/minelittlepony/pony/data/PonyLevel.java similarity index 61% rename from src/main/java/com/minelittlepony/PonyLevel.java rename to src/main/java/com/minelittlepony/pony/data/PonyLevel.java index cc23fb42..573f9c74 100644 --- a/src/main/java/com/minelittlepony/PonyLevel.java +++ b/src/main/java/com/minelittlepony/pony/data/PonyLevel.java @@ -1,4 +1,4 @@ -package com.minelittlepony; +package com.minelittlepony.pony.data; public enum PonyLevel { diff --git a/src/main/java/com/minelittlepony/PonyRace.java b/src/main/java/com/minelittlepony/pony/data/PonyRace.java similarity index 94% rename from src/main/java/com/minelittlepony/PonyRace.java rename to src/main/java/com/minelittlepony/pony/data/PonyRace.java index 35846b7e..d47897c0 100644 --- a/src/main/java/com/minelittlepony/PonyRace.java +++ b/src/main/java/com/minelittlepony/pony/data/PonyRace.java @@ -1,7 +1,6 @@ -package com.minelittlepony; +package com.minelittlepony.pony.data; import com.minelittlepony.model.PlayerModels; -import com.minelittlepony.pony.data.ITriggerPixelMapped; public enum PonyRace implements ITriggerPixelMapped { diff --git a/src/main/java/com/minelittlepony/PonySize.java b/src/main/java/com/minelittlepony/pony/data/PonySize.java similarity index 87% rename from src/main/java/com/minelittlepony/PonySize.java rename to src/main/java/com/minelittlepony/pony/data/PonySize.java index 1c230455..8f4d07d6 100644 --- a/src/main/java/com/minelittlepony/PonySize.java +++ b/src/main/java/com/minelittlepony/pony/data/PonySize.java @@ -1,6 +1,4 @@ -package com.minelittlepony; - -import com.minelittlepony.pony.data.ITriggerPixelMapped; +package com.minelittlepony.pony.data; public enum PonySize implements ITriggerPixelMapped { NORMAL(0, 0.4f, 1f), diff --git a/src/main/java/com/minelittlepony/TailLengths.java b/src/main/java/com/minelittlepony/pony/data/TailLengths.java similarity index 81% rename from src/main/java/com/minelittlepony/TailLengths.java rename to src/main/java/com/minelittlepony/pony/data/TailLengths.java index 483cb977..7007e390 100644 --- a/src/main/java/com/minelittlepony/TailLengths.java +++ b/src/main/java/com/minelittlepony/pony/data/TailLengths.java @@ -1,6 +1,4 @@ -package com.minelittlepony; - -import com.minelittlepony.pony.data.ITriggerPixelMapped; +package com.minelittlepony.pony.data; public enum TailLengths implements ITriggerPixelMapped { diff --git a/src/main/java/com/minelittlepony/pony/data/TriggerPixels.java b/src/main/java/com/minelittlepony/pony/data/TriggerPixels.java index 83ecd9a2..e1c42fca 100644 --- a/src/main/java/com/minelittlepony/pony/data/TriggerPixels.java +++ b/src/main/java/com/minelittlepony/pony/data/TriggerPixels.java @@ -2,11 +2,6 @@ package com.minelittlepony.pony.data; import java.awt.image.BufferedImage; -import com.minelittlepony.PonyGender; -import com.minelittlepony.PonyRace; -import com.minelittlepony.PonySize; -import com.minelittlepony.TailLengths; - public enum TriggerPixels { RACE(PonyRace.HUMAN, 0, 0), TAIL(TailLengths.FULL, 1, 0), diff --git a/src/main/java/com/minelittlepony/renderer/layer/LayerHeldPonyItem.java b/src/main/java/com/minelittlepony/renderer/layer/LayerHeldPonyItem.java index c47061eb..f2fcb1ce 100644 --- a/src/main/java/com/minelittlepony/renderer/layer/LayerHeldPonyItem.java +++ b/src/main/java/com/minelittlepony/renderer/layer/LayerHeldPonyItem.java @@ -1,11 +1,11 @@ package com.minelittlepony.renderer.layer; -import com.minelittlepony.IPonyData; import com.minelittlepony.ducks.IRenderItem; import com.minelittlepony.ducks.IRenderPony; import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.BodyPart; import com.minelittlepony.model.pony.ModelPlayerPony; +import com.minelittlepony.pony.data.IPonyData; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; diff --git a/src/main/java/com/minelittlepony/renderer/player/RenderPonyBase.java b/src/main/java/com/minelittlepony/renderer/player/RenderPonyBase.java index dece3cc2..925f929d 100644 --- a/src/main/java/com/minelittlepony/renderer/player/RenderPonyBase.java +++ b/src/main/java/com/minelittlepony/renderer/player/RenderPonyBase.java @@ -1,12 +1,12 @@ package com.minelittlepony.renderer.player; import com.minelittlepony.MineLittlePony; -import com.minelittlepony.Pony; import com.minelittlepony.ducks.IRenderManager; import com.minelittlepony.ducks.IRenderPony; import com.minelittlepony.model.AbstractPonyModel; import com.minelittlepony.model.PlayerModel; import com.minelittlepony.model.pony.ModelPlayerPony; +import com.minelittlepony.pony.data.Pony; import com.minelittlepony.renderer.layer.LayerEntityOnPonyShoulder; import com.minelittlepony.renderer.layer.LayerHeldPonyItem; import com.minelittlepony.renderer.layer.LayerPonyArmor;