diff --git a/src/client/java/com/minelittlepony/ForgeProxy.java b/src/client/java/com/minelittlepony/client/ForgeProxy.java similarity index 98% rename from src/client/java/com/minelittlepony/ForgeProxy.java rename to src/client/java/com/minelittlepony/client/ForgeProxy.java index 09d5b6a5..fe4b5690 100644 --- a/src/client/java/com/minelittlepony/ForgeProxy.java +++ b/src/client/java/com/minelittlepony/client/ForgeProxy.java @@ -1,4 +1,4 @@ -package com.minelittlepony; +package com.minelittlepony.client; import com.mumfrey.liteloader.util.ModUtilities; import net.minecraft.client.model.ModelBiped; diff --git a/src/client/java/com/minelittlepony/LiteModMineLittlePony.java b/src/client/java/com/minelittlepony/client/LiteModMineLittlePony.java similarity index 90% rename from src/client/java/com/minelittlepony/LiteModMineLittlePony.java rename to src/client/java/com/minelittlepony/client/LiteModMineLittlePony.java index e1e7b9c8..66566c2a 100644 --- a/src/client/java/com/minelittlepony/LiteModMineLittlePony.java +++ b/src/client/java/com/minelittlepony/client/LiteModMineLittlePony.java @@ -1,6 +1,8 @@ -package com.minelittlepony; +package com.minelittlepony.client; -import com.minelittlepony.gui.GuiPonySettings; +import com.minelittlepony.client.gui.GuiPonySettings; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.settings.PonyConfig; import com.mumfrey.liteloader.Configurable; import com.mumfrey.liteloader.InitCompleteListener; import com.mumfrey.liteloader.Tickable; diff --git a/src/client/java/com/minelittlepony/MineLPClient.java b/src/client/java/com/minelittlepony/client/MineLPClient.java similarity index 90% rename from src/client/java/com/minelittlepony/MineLPClient.java rename to src/client/java/com/minelittlepony/client/MineLPClient.java index c6bac6d7..8b04218f 100644 --- a/src/client/java/com/minelittlepony/MineLPClient.java +++ b/src/client/java/com/minelittlepony/client/MineLPClient.java @@ -1,11 +1,13 @@ -package com.minelittlepony; +package com.minelittlepony.client; -import com.minelittlepony.gui.GuiPonySettings; -import com.minelittlepony.hdskins.gui.GuiSkinsMineLP; -import com.minelittlepony.pony.data.PonyData; -import com.minelittlepony.pony.data.PonyDataSerialiser; -import com.minelittlepony.pony.data.PonyManager; -import com.minelittlepony.render.skull.PonySkullRenderer; +import com.minelittlepony.client.gui.GuiPonySettings; +import com.minelittlepony.client.pony.PonyData; +import com.minelittlepony.client.pony.PonyDataSerialiser; +import com.minelittlepony.client.pony.PonyManager; +import com.minelittlepony.client.render.tileentities.skull.PonySkullRenderer; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.settings.PonyConfig; +import com.minelittlepony.hdskins.client.gui.GuiSkinsMineLP; import com.voxelmodpack.hdskins.HDSkinManager; import com.voxelmodpack.hdskins.server.LegacySkinServer; import com.voxelmodpack.hdskins.server.SkinServer; diff --git a/src/client/java/com/minelittlepony/PonyRenderManager.java b/src/client/java/com/minelittlepony/client/PonyRenderManager.java similarity index 87% rename from src/client/java/com/minelittlepony/PonyRenderManager.java rename to src/client/java/com/minelittlepony/client/PonyRenderManager.java index 5340753b..47d9ce2a 100644 --- a/src/client/java/com/minelittlepony/PonyRenderManager.java +++ b/src/client/java/com/minelittlepony/client/PonyRenderManager.java @@ -1,16 +1,17 @@ -package com.minelittlepony; +package com.minelittlepony.client; import java.util.Map; import com.google.common.collect.Maps; -import com.minelittlepony.mixin.MixinRenderManager; -import com.minelittlepony.ducks.IRenderPony; -import com.minelittlepony.hdskins.gui.EntityPonyModel; -import com.minelittlepony.hdskins.gui.RenderPonyModel; -import com.minelittlepony.model.player.PlayerModels; -import com.minelittlepony.render.LevitatingItemRenderer; -import com.minelittlepony.render.player.RenderPonyPlayer; -import com.minelittlepony.render.ponies.MobRenderers; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.mixin.MixinRenderManager; +import com.minelittlepony.client.model.races.PlayerModels; +import com.minelittlepony.client.render.LevitatingItemRenderer; +import com.minelittlepony.client.render.entities.MobRenderers; +import com.minelittlepony.client.render.entities.player.RenderPonyPlayer; +import com.minelittlepony.common.settings.PonyConfig; +import com.minelittlepony.hdskins.client.gui.RenderPonyModel; +import com.minelittlepony.hdskins.entity.EntityPonyModel; import com.mumfrey.liteloader.util.ModUtilities; import javax.annotation.Nullable; diff --git a/src/client/java/com/minelittlepony/PonySkinModifier.java b/src/client/java/com/minelittlepony/client/PonySkinModifier.java similarity index 97% rename from src/client/java/com/minelittlepony/PonySkinModifier.java rename to src/client/java/com/minelittlepony/client/PonySkinModifier.java index 845208f5..f14d58ce 100644 --- a/src/client/java/com/minelittlepony/PonySkinModifier.java +++ b/src/client/java/com/minelittlepony/client/PonySkinModifier.java @@ -1,4 +1,4 @@ -package com.minelittlepony; +package com.minelittlepony.client; import com.voxelmodpack.hdskins.ISkinModifier; diff --git a/src/client/java/com/minelittlepony/PonySkinParser.java b/src/client/java/com/minelittlepony/client/PonySkinParser.java similarity index 73% rename from src/client/java/com/minelittlepony/PonySkinParser.java rename to src/client/java/com/minelittlepony/client/PonySkinParser.java index 75be1684..1e8cda09 100644 --- a/src/client/java/com/minelittlepony/PonySkinParser.java +++ b/src/client/java/com/minelittlepony/client/PonySkinParser.java @@ -1,5 +1,7 @@ -package com.minelittlepony; +package com.minelittlepony.client; +import com.minelittlepony.client.model.races.PlayerModels; +import com.minelittlepony.common.MineLittlePony; import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.voxelmodpack.hdskins.ISkinParser; @@ -18,10 +20,9 @@ public class PonySkinParser implements ISkinParser { boolean slim = VanillaModels.isSlim(metadata.get("model")); // TODO use proper model metadata system - metadata.put("model", MineLittlePony.getInstance().getManager() + metadata.put("model", PlayerModels.forRace(MineLittlePony.getInstance().getManager() .getPony(resource, profile.getId()) - .getRace(false) - .getModel() + .getRace(false)) .getId(slim)); } diff --git a/src/client/java/com/minelittlepony/ducks/IRenderItem.java b/src/client/java/com/minelittlepony/client/ducks/IRenderItem.java similarity index 79% rename from src/client/java/com/minelittlepony/ducks/IRenderItem.java rename to src/client/java/com/minelittlepony/client/ducks/IRenderItem.java index ebd69469..6430bd47 100644 --- a/src/client/java/com/minelittlepony/ducks/IRenderItem.java +++ b/src/client/java/com/minelittlepony/client/ducks/IRenderItem.java @@ -1,4 +1,4 @@ -package com.minelittlepony.ducks; +package com.minelittlepony.client.ducks; public interface IRenderItem { diff --git a/src/client/java/com/minelittlepony/ducks/IRenderPony.java b/src/client/java/com/minelittlepony/client/ducks/IRenderPony.java similarity index 72% rename from src/client/java/com/minelittlepony/ducks/IRenderPony.java rename to src/client/java/com/minelittlepony/client/ducks/IRenderPony.java index b6cc0503..7cd64eb3 100644 --- a/src/client/java/com/minelittlepony/ducks/IRenderPony.java +++ b/src/client/java/com/minelittlepony/client/ducks/IRenderPony.java @@ -1,11 +1,11 @@ -package com.minelittlepony.ducks; +package com.minelittlepony.client.ducks; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.ModelWrapper; -import com.minelittlepony.model.PonyModelConstants; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.render.RenderPony; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.render.RenderPony; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.model.PonyModelConstants; +import com.minelittlepony.common.pony.IPony; import com.minelittlepony.util.math.MathUtil; import net.minecraft.entity.EntityLivingBase; @@ -35,7 +35,7 @@ public interface IRenderPony extends PonyModelConsta float yaw = MathUtil.interpolateDegress(entity.prevRenderYawOffset, entity.renderYawOffset, ticks); getModelWrapper().apply(entityPony.getMetadata()); - IModel model = getModelWrapper().getBody(); + IClientModel model = getModelWrapper().getBody(); model.transform(BodyPart.BACK); diff --git a/src/client/java/com/minelittlepony/ducks/package-info.java b/src/client/java/com/minelittlepony/client/ducks/package-info.java similarity index 79% rename from src/client/java/com/minelittlepony/ducks/package-info.java rename to src/client/java/com/minelittlepony/client/ducks/package-info.java index b0c986c7..90f115b8 100644 --- a/src/client/java/com/minelittlepony/ducks/package-info.java +++ b/src/client/java/com/minelittlepony/client/ducks/package-info.java @@ -1,6 +1,6 @@ @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -package com.minelittlepony.ducks; +package com.minelittlepony.client.ducks; import mcp.MethodsReturnNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/gui/GuiPonySettings.java b/src/client/java/com/minelittlepony/client/gui/GuiPonySettings.java similarity index 86% rename from src/client/java/com/minelittlepony/gui/GuiPonySettings.java rename to src/client/java/com/minelittlepony/client/gui/GuiPonySettings.java index 271889d7..5334e1f9 100644 --- a/src/client/java/com/minelittlepony/gui/GuiPonySettings.java +++ b/src/client/java/com/minelittlepony/client/gui/GuiPonySettings.java @@ -1,10 +1,14 @@ -package com.minelittlepony.gui; +package com.minelittlepony.client.gui; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.PonyConfig; -import com.minelittlepony.PonyConfig.PonySettings; -import com.minelittlepony.pony.data.PonyLevel; -import com.minelittlepony.render.ponies.MobRenderers; +import com.minelittlepony.client.render.entities.MobRenderers; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.settings.PonyConfig; +import com.minelittlepony.common.settings.PonyLevel; +import com.minelittlepony.common.settings.PonyConfig.PonySettings; +import com.minelittlepony.gui.Checkbox; +import com.minelittlepony.gui.Label; +import com.minelittlepony.gui.SettingsPanel; +import com.minelittlepony.gui.Slider; /** * In-Game options menu. diff --git a/src/client/java/com/minelittlepony/mixin/MixinDefaultPlayerSkin.java b/src/client/java/com/minelittlepony/client/mixin/MixinDefaultPlayerSkin.java similarity index 79% rename from src/client/java/com/minelittlepony/mixin/MixinDefaultPlayerSkin.java rename to src/client/java/com/minelittlepony/client/mixin/MixinDefaultPlayerSkin.java index 62414a7e..68a195d9 100644 --- a/src/client/java/com/minelittlepony/mixin/MixinDefaultPlayerSkin.java +++ b/src/client/java/com/minelittlepony/client/mixin/MixinDefaultPlayerSkin.java @@ -1,8 +1,9 @@ -package com.minelittlepony.mixin; +package com.minelittlepony.client.mixin; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.pony.data.IPonyManager; -import com.minelittlepony.pony.data.PonyLevel; +import com.minelittlepony.client.model.races.PlayerModels; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPonyManager; +import com.minelittlepony.common.settings.PonyLevel; import net.minecraft.client.resources.DefaultPlayerSkin; import net.minecraft.util.ResourceLocation; @@ -34,10 +35,9 @@ public abstract class MixinDefaultPlayerSkin { private static void skinType(UUID uuid, CallbackInfoReturnable cir) { if (MineLittlePony.getInstance().getConfig().getPonyLevel() == PonyLevel.PONIES) { - cir.setReturnValue(MineLittlePony.getInstance().getManager() + cir.setReturnValue(PlayerModels.forRace(MineLittlePony.getInstance().getManager() .getPony(IPonyManager.getDefaultSkin(uuid), uuid) - .getRace(false) - .getModel() + .getRace(false)) .getId(IPonyManager.isSlimSkin(uuid))); } } diff --git a/src/client/java/com/minelittlepony/mixin/MixinGlStateManager.java b/src/client/java/com/minelittlepony/client/mixin/MixinGlStateManager.java similarity index 81% rename from src/client/java/com/minelittlepony/mixin/MixinGlStateManager.java rename to src/client/java/com/minelittlepony/client/mixin/MixinGlStateManager.java index d0c42fe8..2e4d27de 100644 --- a/src/client/java/com/minelittlepony/mixin/MixinGlStateManager.java +++ b/src/client/java/com/minelittlepony/client/mixin/MixinGlStateManager.java @@ -1,12 +1,12 @@ -package com.minelittlepony.mixin; +package com.minelittlepony.client.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import com.minelittlepony.render.LevitatingItemRenderer; -import com.minelittlepony.render.skull.PonySkullRenderer; +import com.minelittlepony.client.render.LevitatingItemRenderer; +import com.minelittlepony.client.render.tileentities.skull.PonySkullRenderer; import net.minecraft.client.renderer.GlStateManager; diff --git a/src/client/java/com/minelittlepony/mixin/MixinItemRenderer.java b/src/client/java/com/minelittlepony/client/mixin/MixinItemRenderer.java similarity index 95% rename from src/client/java/com/minelittlepony/mixin/MixinItemRenderer.java rename to src/client/java/com/minelittlepony/client/mixin/MixinItemRenderer.java index cd82d98d..ab5b8bef 100644 --- a/src/client/java/com/minelittlepony/mixin/MixinItemRenderer.java +++ b/src/client/java/com/minelittlepony/client/mixin/MixinItemRenderer.java @@ -1,10 +1,10 @@ -package com.minelittlepony.mixin; +package com.minelittlepony.client.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; -import com.minelittlepony.PonyRenderManager; +import com.minelittlepony.client.PonyRenderManager; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.renderer.ItemRenderer; diff --git a/src/client/java/com/minelittlepony/mixin/MixinRenderItem.java b/src/client/java/com/minelittlepony/client/mixin/MixinRenderItem.java similarity index 92% rename from src/client/java/com/minelittlepony/mixin/MixinRenderItem.java rename to src/client/java/com/minelittlepony/client/mixin/MixinRenderItem.java index cb0c810d..e36f9b53 100644 --- a/src/client/java/com/minelittlepony/mixin/MixinRenderItem.java +++ b/src/client/java/com/minelittlepony/client/mixin/MixinRenderItem.java @@ -1,7 +1,7 @@ -package com.minelittlepony.mixin; +package com.minelittlepony.client.mixin; -import com.minelittlepony.ducks.IRenderItem; -import com.minelittlepony.render.LevitatingItemRenderer; +import com.minelittlepony.client.ducks.IRenderItem; +import com.minelittlepony.client.render.LevitatingItemRenderer; import net.minecraft.client.renderer.RenderItem; import net.minecraft.client.renderer.block.model.IBakedModel; diff --git a/src/client/java/com/minelittlepony/mixin/MixinRenderManager.java b/src/client/java/com/minelittlepony/client/mixin/MixinRenderManager.java similarity index 89% rename from src/client/java/com/minelittlepony/mixin/MixinRenderManager.java rename to src/client/java/com/minelittlepony/client/mixin/MixinRenderManager.java index 5f200841..75c32106 100644 --- a/src/client/java/com/minelittlepony/mixin/MixinRenderManager.java +++ b/src/client/java/com/minelittlepony/client/mixin/MixinRenderManager.java @@ -1,4 +1,4 @@ -package com.minelittlepony.mixin; +package com.minelittlepony.client.mixin; import java.util.Map; diff --git a/src/client/java/com/minelittlepony/mixin/MixinThreadDownloadImageData.java b/src/client/java/com/minelittlepony/client/mixin/MixinThreadDownloadImageData.java similarity index 91% rename from src/client/java/com/minelittlepony/mixin/MixinThreadDownloadImageData.java rename to src/client/java/com/minelittlepony/client/mixin/MixinThreadDownloadImageData.java index e24286a8..86d0a178 100644 --- a/src/client/java/com/minelittlepony/mixin/MixinThreadDownloadImageData.java +++ b/src/client/java/com/minelittlepony/client/mixin/MixinThreadDownloadImageData.java @@ -1,4 +1,4 @@ -package com.minelittlepony.mixin; +package com.minelittlepony.client.mixin; import net.minecraft.client.renderer.ThreadDownloadImageData; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/client/java/com/minelittlepony/hdskins/gui/package-info.java b/src/client/java/com/minelittlepony/client/mixin/package-info.java similarity index 79% rename from src/client/java/com/minelittlepony/hdskins/gui/package-info.java rename to src/client/java/com/minelittlepony/client/mixin/package-info.java index be234747..90e22dda 100644 --- a/src/client/java/com/minelittlepony/hdskins/gui/package-info.java +++ b/src/client/java/com/minelittlepony/client/mixin/package-info.java @@ -1,6 +1,6 @@ @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -package com.minelittlepony.hdskins.gui; +package com.minelittlepony.client.mixin; import mcp.MethodsReturnNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/model/AbstractPonyModel.java b/src/client/java/com/minelittlepony/client/model/AbstractPonyModel.java similarity index 95% rename from src/client/java/com/minelittlepony/model/AbstractPonyModel.java rename to src/client/java/com/minelittlepony/client/model/AbstractPonyModel.java index 0df37d63..0a6d22e9 100644 --- a/src/client/java/com/minelittlepony/model/AbstractPonyModel.java +++ b/src/client/java/com/minelittlepony/client/model/AbstractPonyModel.java @@ -1,19 +1,22 @@ -package com.minelittlepony.model; +package com.minelittlepony.client.model; -import com.minelittlepony.model.armour.ModelPonyArmor; -import com.minelittlepony.model.armour.PonyArmor; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.model.capabilities.IModelPart; -import com.minelittlepony.model.components.PonySnout; -import com.minelittlepony.model.components.PonyTail; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.pony.data.IPonyData; -import com.minelittlepony.pony.data.PonyData; -import com.minelittlepony.pony.data.PonySize; -import com.minelittlepony.render.model.PlaneRenderer; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.armour.ModelPonyArmor; +import com.minelittlepony.client.model.armour.PonyArmor; +import com.minelittlepony.client.model.components.PonySnout; +import com.minelittlepony.client.model.components.PonyTail; +import com.minelittlepony.client.pony.PonyData; +import com.minelittlepony.client.transform.PonyTransformation; +import com.minelittlepony.client.util.render.AbstractRenderer; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.model.IPart; +import com.minelittlepony.common.model.PonyModelConstants; +import com.minelittlepony.common.model.armour.IEquestrianArmour; +import com.minelittlepony.common.pony.IPony; +import com.minelittlepony.common.pony.IPonyData; +import com.minelittlepony.common.pony.meta.Size; import com.minelittlepony.util.math.MathUtil; -import com.minelittlepony.util.render.AbstractBoxRenderer; import javax.annotation.Nullable; @@ -34,7 +37,7 @@ import static net.minecraft.client.renderer.GlStateManager.*; /** * Foundation class for all types of ponies. */ -public abstract class AbstractPonyModel extends ModelPlayer implements IModel, PonyModelConstants { +public abstract class AbstractPonyModel extends ModelPlayer implements IClientModel, PonyModelConstants { public boolean isSleeping; public boolean isFlying; @@ -64,7 +67,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P public PlaneRenderer upperTorso; public PlaneRenderer neck; - public IModelPart tail; + public IPart tail; public PonySnout snout; public UUID interpolatorId; @@ -74,7 +77,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P } @Override - public PonyArmor createArmour() { + public IEquestrianArmour createArmour() { return new PonyArmor(new ModelPonyArmor(), new ModelPonyArmor()); } @@ -191,10 +194,10 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P setHead(1, 2, isSneak ? -1 : 1); - AbstractBoxRenderer.shiftRotationPoint(bipedRightArm, 0, 2, 6); - AbstractBoxRenderer.shiftRotationPoint(bipedLeftArm, 0, 2, 6); - AbstractBoxRenderer.shiftRotationPoint(bipedRightLeg, 0, 2, -8); - AbstractBoxRenderer.shiftRotationPoint(bipedLeftLeg, 0, 2, -8); + AbstractRenderer.shiftRotationPoint(bipedRightArm, 0, 2, 6); + AbstractRenderer.shiftRotationPoint(bipedLeftArm, 0, 2, 6); + AbstractRenderer.shiftRotationPoint(bipedRightLeg, 0, 2, -8); + AbstractRenderer.shiftRotationPoint(bipedLeftLeg, 0, 2, -8); } protected void ponyRide() { @@ -803,12 +806,12 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P @Override public boolean isChild() { - return getSize() == PonySize.FOAL; + return getSize() == Size.FOAL; } @Override - public PonySize getSize() { - return isChild ? PonySize.FOAL : getMetadata().getSize(); + public Size getSize() { + return isChild ? Size.FOAL : getMetadata().getSize(); } @Override @@ -935,7 +938,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P rotate(motionPitch, 1, 0, 0); } - getSize().getTranformation().transform(this, part); + PonyTransformation.forSize(getSize()).transform(this, part); } /** diff --git a/src/client/java/com/minelittlepony/client/model/IClientModel.java b/src/client/java/com/minelittlepony/client/model/IClientModel.java new file mode 100644 index 00000000..2f696cb9 --- /dev/null +++ b/src/client/java/com/minelittlepony/client/model/IClientModel.java @@ -0,0 +1,10 @@ +package com.minelittlepony.client.model; + +import net.minecraft.client.model.ModelRenderer; + +import com.minelittlepony.common.model.ICapitated; +import com.minelittlepony.common.model.IModel; + +public interface IClientModel extends IModel, ICapitated { + +} diff --git a/src/client/java/com/minelittlepony/model/ModelMobPony.java b/src/client/java/com/minelittlepony/client/model/ModelMobPony.java similarity index 92% rename from src/client/java/com/minelittlepony/model/ModelMobPony.java rename to src/client/java/com/minelittlepony/client/model/ModelMobPony.java index 1b196f1d..9283d1e6 100644 --- a/src/client/java/com/minelittlepony/model/ModelMobPony.java +++ b/src/client/java/com/minelittlepony/client/model/ModelMobPony.java @@ -1,10 +1,10 @@ -package com.minelittlepony.model; - -import com.minelittlepony.model.player.ModelAlicorn; +package com.minelittlepony.client.model; import net.minecraft.client.model.ModelRenderer; import net.minecraft.util.math.MathHelper; +import com.minelittlepony.client.model.races.ModelAlicorn; + /** * Common class for all humanoid (ponioid?) non-player enemies. * diff --git a/src/client/java/com/minelittlepony/model/ModelWrapper.java b/src/client/java/com/minelittlepony/client/model/ModelWrapper.java similarity index 83% rename from src/client/java/com/minelittlepony/model/ModelWrapper.java rename to src/client/java/com/minelittlepony/client/model/ModelWrapper.java index ea91436a..07b22853 100644 --- a/src/client/java/com/minelittlepony/model/ModelWrapper.java +++ b/src/client/java/com/minelittlepony/client/model/ModelWrapper.java @@ -1,9 +1,9 @@ -package com.minelittlepony.model; +package com.minelittlepony.client.model; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.model.armour.IEquestrianArmour; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.model.armour.IEquestrianArmour; +import com.minelittlepony.common.pony.IPonyData; import com.minelittlepony.model.capabilities.IModelWrapper; -import com.minelittlepony.pony.data.IPonyData; /** * Container class for the various models and their associated piece of armour. @@ -19,7 +19,7 @@ public class ModelWrapper implements IModelWrapper { /** * Creates a new model wrapper to contain the given pony. */ - ModelWrapper(AbstractPonyModel model) { + public ModelWrapper(AbstractPonyModel model) { body = model; armor = model.createArmour(); armor.apply(model.getMetadata()); diff --git a/src/client/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java b/src/client/java/com/minelittlepony/client/model/armour/DefaultPonyArmorTextureResolver.java similarity index 94% rename from src/client/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java rename to src/client/java/com/minelittlepony/client/model/armour/DefaultPonyArmorTextureResolver.java index 44df7f5e..dbb5f752 100644 --- a/src/client/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java +++ b/src/client/java/com/minelittlepony/client/model/armour/DefaultPonyArmorTextureResolver.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.armour; +package com.minelittlepony.client.model.armour; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.ResourcePackRepository; @@ -9,7 +9,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import com.google.common.collect.Maps; -import com.minelittlepony.ForgeProxy; +import com.minelittlepony.client.ForgeProxy; +import com.minelittlepony.common.model.armour.ArmourLayer; +import com.minelittlepony.common.model.armour.IArmourTextureResolver; import javax.annotation.Nullable; diff --git a/src/client/java/com/minelittlepony/model/armour/ModelPonyArmor.java b/src/client/java/com/minelittlepony/client/model/armour/ModelPonyArmor.java similarity index 77% rename from src/client/java/com/minelittlepony/model/armour/ModelPonyArmor.java rename to src/client/java/com/minelittlepony/client/model/armour/ModelPonyArmor.java index fe567afa..b920bed0 100644 --- a/src/client/java/com/minelittlepony/model/armour/ModelPonyArmor.java +++ b/src/client/java/com/minelittlepony/client/model/armour/ModelPonyArmor.java @@ -1,14 +1,14 @@ -package com.minelittlepony.model.armour; +package com.minelittlepony.client.model.armour; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.model.capabilities.IModelArmour; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.IModel; +import com.minelittlepony.common.model.armour.IArmour; -public class ModelPonyArmor extends AbstractPonyModel implements IModelArmour { +public class ModelPonyArmor extends AbstractPonyModel implements IArmour { public PonyRenderer chestPiece; @@ -32,12 +32,16 @@ public class ModelPonyArmor extends AbstractPonyModel implements IModelArmour { } @Override - public void synchroniseLegs(T mainModel) { - copyModelAngles(mainModel.bipedBody, bipedBody); - copyModelAngles(mainModel.bipedRightArm, bipedRightArm); - copyModelAngles(mainModel.bipedLeftArm, bipedLeftArm); - copyModelAngles(mainModel.bipedRightLeg, bipedRightLeg); - copyModelAngles(mainModel.bipedLeftLeg, bipedLeftLeg); + public void synchroniseLegs(IModel model) { + + if (model instanceof ModelBiped) { + ModelBiped mainModel = (ModelBiped)model; + copyModelAngles(mainModel.bipedBody, bipedBody); + copyModelAngles(mainModel.bipedRightArm, bipedRightArm); + copyModelAngles(mainModel.bipedLeftArm, bipedLeftArm); + copyModelAngles(mainModel.bipedRightLeg, bipedRightLeg); + copyModelAngles(mainModel.bipedLeftLeg, bipedLeftLeg); + } } @Override diff --git a/src/client/java/com/minelittlepony/model/armour/PonyArmor.java b/src/client/java/com/minelittlepony/client/model/armour/PonyArmor.java similarity index 77% rename from src/client/java/com/minelittlepony/model/armour/PonyArmor.java rename to src/client/java/com/minelittlepony/client/model/armour/PonyArmor.java index e630aab4..23bf380c 100644 --- a/src/client/java/com/minelittlepony/model/armour/PonyArmor.java +++ b/src/client/java/com/minelittlepony/client/model/armour/PonyArmor.java @@ -1,6 +1,8 @@ -package com.minelittlepony.model.armour; +package com.minelittlepony.client.model.armour; -import com.minelittlepony.pony.data.IPonyData; +import com.minelittlepony.common.model.armour.ArmourLayer; +import com.minelittlepony.common.model.armour.IEquestrianArmour; +import com.minelittlepony.common.pony.IPonyData; public class PonyArmor implements IEquestrianArmour { diff --git a/src/client/java/com/minelittlepony/client/model/armour/package-info.java b/src/client/java/com/minelittlepony/client/model/armour/package-info.java new file mode 100644 index 00000000..f8eaa580 --- /dev/null +++ b/src/client/java/com/minelittlepony/client/model/armour/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.model.armour; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/model/components/BatWings.java b/src/client/java/com/minelittlepony/client/model/components/BatWings.java similarity index 75% rename from src/client/java/com/minelittlepony/model/components/BatWings.java rename to src/client/java/com/minelittlepony/client/model/components/BatWings.java index 25b66891..e62565e0 100644 --- a/src/client/java/com/minelittlepony/model/components/BatWings.java +++ b/src/client/java/com/minelittlepony/client/model/components/BatWings.java @@ -1,13 +1,13 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; import net.minecraft.client.renderer.GlStateManager; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModelPegasus; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.common.model.IPegasus; import java.util.UUID; -public class BatWings extends PegasusWings { +public class BatWings extends PegasusWings { public BatWings(T model, float yOffset, float stretch) { super(model, yOffset, stretch); diff --git a/src/client/java/com/minelittlepony/model/components/BugWings.java b/src/client/java/com/minelittlepony/client/model/components/BugWings.java similarity index 63% rename from src/client/java/com/minelittlepony/model/components/BugWings.java rename to src/client/java/com/minelittlepony/client/model/components/BugWings.java index ca51ee29..55fa6c1f 100644 --- a/src/client/java/com/minelittlepony/model/components/BugWings.java +++ b/src/client/java/com/minelittlepony/client/model/components/BugWings.java @@ -1,9 +1,9 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModelPegasus; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.common.model.IPegasus; -public class BugWings extends PegasusWings { +public class BugWings extends PegasusWings { public BugWings(T model, float yOffset, float stretch) { super(model, yOffset, stretch); diff --git a/src/client/java/com/minelittlepony/model/components/ModelBatWing.java b/src/client/java/com/minelittlepony/client/model/components/ModelBatWing.java similarity index 86% rename from src/client/java/com/minelittlepony/model/components/ModelBatWing.java rename to src/client/java/com/minelittlepony/client/model/components/ModelBatWing.java index 272ca830..9cfc40c9 100644 --- a/src/client/java/com/minelittlepony/model/components/ModelBatWing.java +++ b/src/client/java/com/minelittlepony/client/model/components/ModelBatWing.java @@ -1,10 +1,10 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModelPegasus; -import com.minelittlepony.render.model.PlaneRenderer; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.model.IPegasus; -public class ModelBatWing extends ModelWing { +public class ModelBatWing extends ModelWing { public ModelBatWing(T pegasus, boolean right, boolean legacy, float y, float scale, int texY) { super(pegasus, right, legacy, y, scale, texY); diff --git a/src/client/java/com/minelittlepony/model/components/ModelBugWing.java b/src/client/java/com/minelittlepony/client/model/components/ModelBugWing.java similarity index 80% rename from src/client/java/com/minelittlepony/model/components/ModelBugWing.java rename to src/client/java/com/minelittlepony/client/model/components/ModelBugWing.java index 0dc71cc1..695cf5ed 100644 --- a/src/client/java/com/minelittlepony/model/components/ModelBugWing.java +++ b/src/client/java/com/minelittlepony/client/model/components/ModelBugWing.java @@ -1,10 +1,10 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModelPegasus; -import com.minelittlepony.render.model.PlaneRenderer; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.model.IPegasus; -public class ModelBugWing extends ModelWing { +public class ModelBugWing extends ModelWing { public ModelBugWing(T pegasus, boolean right, boolean legacy, float y, float scale, int texY) { super(pegasus, right, legacy, y, scale, texY); diff --git a/src/client/java/com/minelittlepony/model/components/ModelDeadMau5Ears.java b/src/client/java/com/minelittlepony/client/model/components/ModelDeadMau5Ears.java similarity index 90% rename from src/client/java/com/minelittlepony/model/components/ModelDeadMau5Ears.java rename to src/client/java/com/minelittlepony/client/model/components/ModelDeadMau5Ears.java index 0cf549a4..dbcccff9 100644 --- a/src/client/java/com/minelittlepony/model/components/ModelDeadMau5Ears.java +++ b/src/client/java/com/minelittlepony/client/model/components/ModelDeadMau5Ears.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelSkeletonHead; diff --git a/src/client/java/com/minelittlepony/model/components/ModelPonyHead.java b/src/client/java/com/minelittlepony/client/model/components/ModelPonyHead.java similarity index 85% rename from src/client/java/com/minelittlepony/model/components/ModelPonyHead.java rename to src/client/java/com/minelittlepony/client/model/components/ModelPonyHead.java index 322ca435..92a1e9de 100644 --- a/src/client/java/com/minelittlepony/model/components/ModelPonyHead.java +++ b/src/client/java/com/minelittlepony/client/model/components/ModelPonyHead.java @@ -1,9 +1,9 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; -import com.minelittlepony.model.capabilities.ICapitated; -import com.minelittlepony.pony.data.IPonyData; -import com.minelittlepony.pony.data.PonyData; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.pony.PonyData; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.ICapitated; +import com.minelittlepony.common.pony.IPonyData; import javax.annotation.Nullable; @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelHumanoidHead; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelPonyHead extends ModelHumanoidHead implements ICapitated { +public class ModelPonyHead extends ModelHumanoidHead implements ICapitated { private PonySnout snout; diff --git a/src/client/java/com/minelittlepony/model/components/ModelWing.java b/src/client/java/com/minelittlepony/client/model/components/ModelWing.java similarity index 82% rename from src/client/java/com/minelittlepony/model/components/ModelWing.java rename to src/client/java/com/minelittlepony/client/model/components/ModelWing.java index d8a9b1f3..84d3d344 100644 --- a/src/client/java/com/minelittlepony/model/components/ModelWing.java +++ b/src/client/java/com/minelittlepony/client/model/components/ModelWing.java @@ -1,14 +1,14 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.PonyModelConstants; -import com.minelittlepony.model.capabilities.IModelPegasus; -import com.minelittlepony.pony.data.PonyWearable; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.IPegasus; +import com.minelittlepony.common.model.PonyModelConstants; +import com.minelittlepony.common.pony.meta.Wearable; import net.minecraft.client.renderer.GlStateManager; -public class ModelWing implements PonyModelConstants { +public class ModelWing implements PonyModelConstants { protected final T pegasus; @@ -64,7 +64,7 @@ public class ModelWing implements P if (pegasus.wingsAreOpen()) { extended.render(scale); } else { - boolean bags = pegasus.isWearing(PonyWearable.SADDLE_BAGS); + boolean bags = pegasus.isWearing(Wearable.SADDLE_BAGS); if (bags) { GlStateManager.pushMatrix(); GlStateManager.translate(0, 0, 0.198F); diff --git a/src/client/java/com/minelittlepony/model/components/PegasusWings.java b/src/client/java/com/minelittlepony/client/model/components/PegasusWings.java similarity index 77% rename from src/client/java/com/minelittlepony/model/components/PegasusWings.java rename to src/client/java/com/minelittlepony/client/model/components/PegasusWings.java index 4897360c..a984efee 100644 --- a/src/client/java/com/minelittlepony/model/components/PegasusWings.java +++ b/src/client/java/com/minelittlepony/client/model/components/PegasusWings.java @@ -1,17 +1,17 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; import net.minecraft.util.math.MathHelper; -import static com.minelittlepony.model.PonyModelConstants.*; - -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModelPart; -import com.minelittlepony.model.capabilities.IModelPegasus; -import com.minelittlepony.pony.data.PonyWearable; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.common.model.IPart; +import com.minelittlepony.common.model.IPegasus; +import com.minelittlepony.common.pony.meta.Wearable; import java.util.UUID; -public class PegasusWings implements IModelPart { +import static com.minelittlepony.common.model.PonyModelConstants.*; + +public class PegasusWings implements IPart { protected final T pegasus; @@ -39,7 +39,7 @@ public class PegasusWings implement } public ModelWing getRight() { - return pegasus.isWearing(PonyWearable.SADDLE_BAGS) ? legacyWing : rightWing; + return pegasus.isWearing(Wearable.SADDLE_BAGS) ? legacyWing : rightWing; } @Override @@ -65,7 +65,7 @@ public class PegasusWings implement if (pegasus.wingsAreOpen()) { flapAngle = pegasus.getWingRotationFactor(ticks); - if (!pegasus.isCrouching() && pegasus.isWearing(PonyWearable.SADDLE_BAGS)) { + if (!pegasus.isCrouching() && pegasus.isWearing(Wearable.SADDLE_BAGS)) { flapAngle -= 1F; } } diff --git a/src/client/java/com/minelittlepony/model/components/PonyElytra.java b/src/client/java/com/minelittlepony/client/model/components/PonyElytra.java similarity index 93% rename from src/client/java/com/minelittlepony/model/components/PonyElytra.java rename to src/client/java/com/minelittlepony/client/model/components/PonyElytra.java index fa5cd151..2d7fc889 100644 --- a/src/client/java/com/minelittlepony/model/components/PonyElytra.java +++ b/src/client/java/com/minelittlepony/client/model/components/PonyElytra.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.model.ModelBase; @@ -7,9 +7,10 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.math.Vec3d; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.util.render.PonyRenderer; -import static com.minelittlepony.model.PonyModelConstants.*; +import static com.minelittlepony.common.model.PonyModelConstants.*; /** * Modified from ModelElytra. diff --git a/src/client/java/com/minelittlepony/model/components/PonySnout.java b/src/client/java/com/minelittlepony/client/model/components/PonySnout.java similarity index 74% rename from src/client/java/com/minelittlepony/model/components/PonySnout.java rename to src/client/java/com/minelittlepony/client/model/components/PonySnout.java index bf5602fd..c98371de 100644 --- a/src/client/java/com/minelittlepony/model/components/PonySnout.java +++ b/src/client/java/com/minelittlepony/client/model/components/PonySnout.java @@ -1,14 +1,14 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; -import com.minelittlepony.pony.data.PonyGender; -import com.minelittlepony.render.model.PlaneRenderer; +import static com.minelittlepony.common.model.PonyModelConstants.*; import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; -import static com.minelittlepony.model.PonyModelConstants.*; - -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.model.capabilities.ICapitated; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.model.ICapitated; +import com.minelittlepony.common.pony.meta.Gender; public class PonySnout { @@ -17,13 +17,13 @@ public class PonySnout { private PlaneRenderer mare; private PlaneRenderer stallion; - private final ICapitated head; + private final ICapitated head; - public PonySnout(T pony) { + public > PonySnout(T pony) { this(pony, 0, 0, 0); } - public PonySnout(T pony, int x, int y, int z) { + public > PonySnout(T pony, int x, int y, int z) { head = pony; mare = new PlaneRenderer(pony).offset(HEAD_CENTRE_X + x, HEAD_CENTRE_Y + y, HEAD_CENTRE_Z + z + 0.25F); @@ -58,7 +58,7 @@ public class PonySnout { .tex(13, 13) .east( 2, 1, -5, 3, 1, stretch); } - public void setGender(PonyGender gender) { + public void setGender(Gender gender) { boolean show = !head.hasHeadGear() && !isHidden && MineLittlePony.getInstance().getConfig().snuzzles; mare.isHidden = !(show && gender.isMare()); diff --git a/src/client/java/com/minelittlepony/model/components/PonyTail.java b/src/client/java/com/minelittlepony/client/model/components/PonyTail.java similarity index 89% rename from src/client/java/com/minelittlepony/model/components/PonyTail.java rename to src/client/java/com/minelittlepony/client/model/components/PonyTail.java index 14e325b3..50afe4e9 100644 --- a/src/client/java/com/minelittlepony/model/components/PonyTail.java +++ b/src/client/java/com/minelittlepony/client/model/components/PonyTail.java @@ -1,17 +1,17 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; import net.minecraft.client.model.ModelBase; import net.minecraft.util.math.MathHelper; -import static com.minelittlepony.model.PonyModelConstants.*; - -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModelPart; -import com.minelittlepony.render.model.PlaneRenderer; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.model.IPart; import java.util.UUID; -public class PonyTail extends PlaneRenderer implements IModelPart { +import static com.minelittlepony.common.model.PonyModelConstants.*; + +public class PonyTail extends PlaneRenderer implements IPart { private static final int SEGMENTS = 4; diff --git a/src/client/java/com/minelittlepony/model/components/SeaponyTail.java b/src/client/java/com/minelittlepony/client/model/components/SeaponyTail.java similarity index 79% rename from src/client/java/com/minelittlepony/model/components/SeaponyTail.java rename to src/client/java/com/minelittlepony/client/model/components/SeaponyTail.java index a850e80a..e2098b82 100644 --- a/src/client/java/com/minelittlepony/model/components/SeaponyTail.java +++ b/src/client/java/com/minelittlepony/client/model/components/SeaponyTail.java @@ -1,21 +1,21 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.model.capabilities.IModelPart; -import com.minelittlepony.render.model.PlaneRenderer; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.model.IPart; import java.util.UUID; +import static com.minelittlepony.common.model.PonyModelConstants.*; + import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.math.MathHelper; import org.lwjgl.opengl.GL11; -import static com.minelittlepony.model.PonyModelConstants.*; - -public class SeaponyTail implements IModelPart { +public class SeaponyTail implements IPart { private static final float TAIL_ROTX = PI / 2; @@ -24,7 +24,7 @@ public class SeaponyTail implements IModelPart { private PlaneRenderer tailTip; private PlaneRenderer tailFins; - private IModel model; + private IClientModel model; public SeaponyTail(AbstractPonyModel model) { this.model = model; diff --git a/src/client/java/com/minelittlepony/model/components/UnicornHorn.java b/src/client/java/com/minelittlepony/client/model/components/UnicornHorn.java similarity index 70% rename from src/client/java/com/minelittlepony/model/components/UnicornHorn.java rename to src/client/java/com/minelittlepony/client/model/components/UnicornHorn.java index 6cd3d6f6..cc6bfc83 100644 --- a/src/client/java/com/minelittlepony/model/components/UnicornHorn.java +++ b/src/client/java/com/minelittlepony/client/model/components/UnicornHorn.java @@ -1,30 +1,32 @@ -package com.minelittlepony.model.components; +package com.minelittlepony.client.model.components; -import com.minelittlepony.model.capabilities.ICapitated; -import com.minelittlepony.model.capabilities.IModelPart; -import com.minelittlepony.render.model.GlowRenderer; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.util.render.GlowRenderer; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.ICapitated; +import com.minelittlepony.common.model.IPart; import java.util.UUID; +import static com.minelittlepony.common.model.PonyModelConstants.*; + import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; import static org.lwjgl.opengl.GL11.*; import static net.minecraft.client.renderer.GlStateManager.*; -import static com.minelittlepony.model.PonyModelConstants.*; -public class UnicornHorn implements IModelPart { +public class UnicornHorn implements IPart { protected PonyRenderer horn; protected GlowRenderer glow; protected boolean isVisible = true; - public UnicornHorn(T pony, float yOffset, float stretch) { + public > UnicornHorn(T pony, float yOffset, float stretch) { this(pony, yOffset, stretch, 0, 0, 0); } - public UnicornHorn(T pony, float yOffset, float stretch, int x, int y, int z) { + public > UnicornHorn(T pony, float yOffset, float stretch, int x, int y, int z) { horn = new PonyRenderer(pony, 0, 3); glow = new GlowRenderer(pony, 0, 3); diff --git a/src/client/java/com/minelittlepony/client/model/components/package-info.java b/src/client/java/com/minelittlepony/client/model/components/package-info.java new file mode 100644 index 00000000..5e9811f5 --- /dev/null +++ b/src/client/java/com/minelittlepony/client/model/components/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.model.components; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelBreezie.java b/src/client/java/com/minelittlepony/client/model/entities/ModelBreezie.java similarity index 97% rename from src/client/java/com/minelittlepony/model/ponies/ModelBreezie.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelBreezie.java index 079b62f6..cd331b48 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelBreezie.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelBreezie.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.ponies; +package com.minelittlepony.client.model.entities; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; @@ -6,9 +6,9 @@ import net.minecraft.entity.Entity; import net.minecraft.util.EnumHandSide; import net.minecraft.util.math.MathHelper; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.util.render.PonyRenderer; -import static com.minelittlepony.model.PonyModelConstants.PI; +import static com.minelittlepony.common.model.PonyModelConstants.PI; public class ModelBreezie extends ModelBiped { diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelEnderStallion.java b/src/client/java/com/minelittlepony/client/model/entities/ModelEnderStallion.java similarity index 96% rename from src/client/java/com/minelittlepony/model/ponies/ModelEnderStallion.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelEnderStallion.java index 13b3bd09..288b6397 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelEnderStallion.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelEnderStallion.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.ponies; +package com.minelittlepony.client.model.entities; import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.renderer.GlStateManager; @@ -6,8 +6,8 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.math.MathHelper; -import com.minelittlepony.model.components.PonySnout; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.components.PonySnout; +import com.minelittlepony.client.util.render.PonyRenderer; public class ModelEnderStallion extends ModelSkeletonPony { diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelIllagerPony.java b/src/client/java/com/minelittlepony/client/model/entities/ModelIllagerPony.java similarity index 95% rename from src/client/java/com/minelittlepony/model/ponies/ModelIllagerPony.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelIllagerPony.java index 342d4dfc..31c2a235 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelIllagerPony.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelIllagerPony.java @@ -1,6 +1,4 @@ -package com.minelittlepony.model.ponies; - -import com.minelittlepony.model.ModelMobPony; +package com.minelittlepony.client.model.entities; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; @@ -9,6 +7,8 @@ import net.minecraft.entity.monster.AbstractIllager.IllagerArmPose; import net.minecraft.util.EnumHandSide; import net.minecraft.util.math.MathHelper; +import com.minelittlepony.client.model.ModelMobPony; + public class ModelIllagerPony extends ModelMobPony { @Override diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelSeapony.java b/src/client/java/com/minelittlepony/client/model/entities/ModelSeapony.java similarity index 90% rename from src/client/java/com/minelittlepony/model/ponies/ModelSeapony.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelSeapony.java index 03e5dc4c..4583d574 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelSeapony.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelSeapony.java @@ -1,13 +1,14 @@ -package com.minelittlepony.model.ponies; +package com.minelittlepony.client.model.entities; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.armour.ModelPonyArmor; -import com.minelittlepony.model.armour.PonyArmor; -import com.minelittlepony.model.components.SeaponyTail; -import com.minelittlepony.model.player.ModelUnicorn; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.render.model.PlaneRenderer; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.armour.ModelPonyArmor; +import com.minelittlepony.client.model.armour.PonyArmor; +import com.minelittlepony.client.model.components.SeaponyTail; +import com.minelittlepony.client.model.races.ModelUnicorn; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.model.armour.IEquestrianArmour; +import com.minelittlepony.common.pony.IPony; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity; @@ -30,7 +31,7 @@ public class ModelSeapony extends ModelUnicorn { } @Override - public PonyArmor createArmour() { + public IEquestrianArmour createArmour() { return new PonyArmor(new Armour(), new Armour()); } diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelSkeletonPony.java b/src/client/java/com/minelittlepony/client/model/entities/ModelSkeletonPony.java similarity index 96% rename from src/client/java/com/minelittlepony/model/ponies/ModelSkeletonPony.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelSkeletonPony.java index 9f0f9f43..c06be481 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelSkeletonPony.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelSkeletonPony.java @@ -1,6 +1,4 @@ -package com.minelittlepony.model.ponies; - -import com.minelittlepony.model.ModelMobPony; +package com.minelittlepony.client.model.entities; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -11,6 +9,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHandSide; +import com.minelittlepony.client.model.ModelMobPony; + public class ModelSkeletonPony extends ModelMobPony { public boolean isUnicorn; diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelVillagerPony.java b/src/client/java/com/minelittlepony/client/model/entities/ModelVillagerPony.java similarity index 87% rename from src/client/java/com/minelittlepony/model/ponies/ModelVillagerPony.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelVillagerPony.java index cd050023..7a81d2ec 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelVillagerPony.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelVillagerPony.java @@ -1,13 +1,13 @@ -package com.minelittlepony.model.ponies; +package com.minelittlepony.client.model.entities; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityZombieVillager; import net.minecraft.entity.passive.EntityVillager; -import com.minelittlepony.model.ModelMobPony; -import com.minelittlepony.pony.data.PonyWearable; -import com.minelittlepony.render.model.PlaneRenderer; +import com.minelittlepony.client.model.ModelMobPony; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.pony.meta.Wearable; public class ModelVillagerPony extends ModelMobPony { @@ -52,12 +52,12 @@ public class ModelVillagerPony extends ModelMobPony { } @Override - public boolean isWearing(PonyWearable wearable) { - if (wearable == PonyWearable.SADDLE_BAGS) { + public boolean isWearing(Wearable wearable) { + if (wearable == Wearable.SADDLE_BAGS) { return !special && profession > -1 && profession < 2; } - if (wearable == PonyWearable.MUFFIN) { + if (wearable == Wearable.MUFFIN) { return special2; } diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelWitchPony.java b/src/client/java/com/minelittlepony/client/model/entities/ModelWitchPony.java similarity index 88% rename from src/client/java/com/minelittlepony/model/ponies/ModelWitchPony.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelWitchPony.java index 43cb080a..409ddb39 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelWitchPony.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelWitchPony.java @@ -1,13 +1,13 @@ -package com.minelittlepony.model.ponies; +package com.minelittlepony.client.model.entities; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityWitch; import net.minecraft.util.math.MathHelper; -import com.minelittlepony.model.player.ModelZebra; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.pony.data.PonyWearable; +import com.minelittlepony.client.model.races.ModelZebra; +import com.minelittlepony.common.pony.IPony; +import com.minelittlepony.common.pony.meta.Wearable; public class ModelWitchPony extends ModelZebra { @@ -77,8 +77,8 @@ public class ModelWitchPony extends ModelZebra { } @Override - public boolean isWearing(PonyWearable wearable) { - if (wearable == PonyWearable.HAT) { + public boolean isWearing(Wearable wearable) { + if (wearable == Wearable.HAT) { return true; } return super.isWearing(wearable); diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelZombiePony.java b/src/client/java/com/minelittlepony/client/model/entities/ModelZombiePony.java similarity index 75% rename from src/client/java/com/minelittlepony/model/ponies/ModelZombiePony.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelZombiePony.java index 1dbcbacb..aa71dd6f 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelZombiePony.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelZombiePony.java @@ -1,7 +1,7 @@ -package com.minelittlepony.model.ponies; +package com.minelittlepony.client.model.entities; -import com.minelittlepony.model.ModelMobPony; -import com.minelittlepony.util.render.AbstractBoxRenderer; +import com.minelittlepony.client.model.ModelMobPony; +import com.minelittlepony.client.util.render.AbstractRenderer; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -23,10 +23,10 @@ public class ModelZombiePony extends ModelMobPony { if (islookAngleRight(move)) { rotateArmHolding(bipedRightArm, 1, swingProgress, ticks); - AbstractBoxRenderer.shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3); + AbstractRenderer.shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3); } else { rotateArmHolding(bipedLeftArm, -1, swingProgress, ticks); - AbstractBoxRenderer.shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3); + AbstractRenderer.shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3); } } diff --git a/src/client/java/com/minelittlepony/model/ponies/ModelZombieVillagerPony.java b/src/client/java/com/minelittlepony/client/model/entities/ModelZombieVillagerPony.java similarity index 71% rename from src/client/java/com/minelittlepony/model/ponies/ModelZombieVillagerPony.java rename to src/client/java/com/minelittlepony/client/model/entities/ModelZombieVillagerPony.java index 526702c9..7e362500 100644 --- a/src/client/java/com/minelittlepony/model/ponies/ModelZombieVillagerPony.java +++ b/src/client/java/com/minelittlepony/client/model/entities/ModelZombieVillagerPony.java @@ -1,9 +1,9 @@ -package com.minelittlepony.model.ponies; +package com.minelittlepony.client.model.entities; import net.minecraft.entity.Entity; import net.minecraft.util.math.MathHelper; -import com.minelittlepony.util.render.AbstractBoxRenderer; +import com.minelittlepony.client.util.render.AbstractRenderer; public class ModelZombieVillagerPony extends ModelVillagerPony { @@ -14,10 +14,10 @@ public class ModelZombieVillagerPony extends ModelVillagerPony { if (islookAngleRight(move)) { rotateArmHolding(bipedRightArm, 1, swingProgress, ticks); - AbstractBoxRenderer.shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3); + AbstractRenderer.shiftRotationPoint(bipedRightArm, 0.5F, 1.5F, 3); } else { rotateArmHolding(bipedLeftArm, -1, swingProgress, ticks); - AbstractBoxRenderer.shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3); + AbstractRenderer.shiftRotationPoint(bipedLeftArm, -0.5F, 1.5F, 3); } } diff --git a/src/client/java/com/minelittlepony/client/model/entities/package-info.java b/src/client/java/com/minelittlepony/client/model/entities/package-info.java new file mode 100644 index 00000000..ce06723a --- /dev/null +++ b/src/client/java/com/minelittlepony/client/model/entities/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.model.entities; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/model/gear/AbstractGear.java b/src/client/java/com/minelittlepony/client/model/gear/AbstractGear.java similarity index 87% rename from src/client/java/com/minelittlepony/model/gear/AbstractGear.java rename to src/client/java/com/minelittlepony/client/model/gear/AbstractGear.java index fc70fb6c..7f6a3a3a 100644 --- a/src/client/java/com/minelittlepony/model/gear/AbstractGear.java +++ b/src/client/java/com/minelittlepony/client/model/gear/AbstractGear.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.gear; +package com.minelittlepony.client.model.gear; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; @@ -8,8 +8,8 @@ import net.minecraft.entity.Entity; import org.lwjgl.opengl.GL11; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.PonyModelConstants; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.common.model.PonyModelConstants; public abstract class AbstractGear extends ModelBase implements IGear, PonyModelConstants { diff --git a/src/client/java/com/minelittlepony/model/gear/ChristmasHat.java b/src/client/java/com/minelittlepony/client/model/gear/ChristmasHat.java similarity index 83% rename from src/client/java/com/minelittlepony/model/gear/ChristmasHat.java rename to src/client/java/com/minelittlepony/client/model/gear/ChristmasHat.java index 4b9b26fa..5ccd8fa4 100644 --- a/src/client/java/com/minelittlepony/model/gear/ChristmasHat.java +++ b/src/client/java/com/minelittlepony/client/model/gear/ChristmasHat.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.gear; +package com.minelittlepony.client.model.gear; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; @@ -6,11 +6,11 @@ import net.minecraft.util.math.MathHelper; import org.lwjgl.opengl.GL11; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.pony.data.PonyWearable; -import com.minelittlepony.render.model.PonyRenderer; -import com.minelittlepony.util.render.Color; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.util.render.Color; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.pony.meta.Wearable; import java.util.Calendar; import java.util.UUID; @@ -48,12 +48,12 @@ public class ChristmasHat extends AbstractGear { } @Override - public boolean canRender(IModel model, Entity entity) { - return isChristmasDay() || model.isWearing(PonyWearable.ANTLERS); + public boolean canRender(IClientModel model, Entity entity) { + return isChristmasDay() || model.isWearing(Wearable.ANTLERS); } @Override - public void setLivingAnimations(IModel model, Entity entity) { + public void setLivingAnimations(IClientModel model, Entity entity) { tint = model.getMetadata().getGlowColor(); } diff --git a/src/client/java/com/minelittlepony/model/gear/IGear.java b/src/client/java/com/minelittlepony/client/model/gear/IGear.java similarity index 72% rename from src/client/java/com/minelittlepony/model/gear/IGear.java rename to src/client/java/com/minelittlepony/client/model/gear/IGear.java index 8f7ae609..3e77c8a8 100644 --- a/src/client/java/com/minelittlepony/model/gear/IGear.java +++ b/src/client/java/com/minelittlepony/client/model/gear/IGear.java @@ -1,18 +1,18 @@ -package com.minelittlepony.model.gear; +package com.minelittlepony.client.model.gear; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.model.capabilities.IModelPart; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.model.IPart; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public interface IGear extends IModelPart { +public interface IGear extends IPart { /** * Determines if this wearable can and is worn by the selected entity. @@ -22,7 +22,7 @@ public interface IGear extends IModelPart { * * @return True to render this wearable */ - boolean canRender(IModel model, Entity entity); + boolean canRender(IClientModel model, Entity entity); /** * Gets the body location that this wearable appears on. @@ -45,7 +45,7 @@ public interface IGear extends IModelPart { /** * Orients this wearable. */ - default void setLivingAnimations(IModel model, Entity entity) { + default void setLivingAnimations(IClientModel model, Entity entity) { } diff --git a/src/client/java/com/minelittlepony/model/gear/IStackable.java b/src/client/java/com/minelittlepony/client/model/gear/IStackable.java similarity index 58% rename from src/client/java/com/minelittlepony/model/gear/IStackable.java rename to src/client/java/com/minelittlepony/client/model/gear/IStackable.java index 8d6e913f..beb01503 100644 --- a/src/client/java/com/minelittlepony/model/gear/IStackable.java +++ b/src/client/java/com/minelittlepony/client/model/gear/IStackable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.gear; +package com.minelittlepony.client.model.gear; public interface IStackable { float getStackingOffset(); diff --git a/src/client/java/com/minelittlepony/model/gear/Muffin.java b/src/client/java/com/minelittlepony/client/model/gear/Muffin.java similarity index 76% rename from src/client/java/com/minelittlepony/model/gear/Muffin.java rename to src/client/java/com/minelittlepony/client/model/gear/Muffin.java index c4e93083..24eb0bb1 100644 --- a/src/client/java/com/minelittlepony/model/gear/Muffin.java +++ b/src/client/java/com/minelittlepony/client/model/gear/Muffin.java @@ -1,12 +1,12 @@ -package com.minelittlepony.model.gear; +package com.minelittlepony.client.model.gear; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.pony.data.PonyWearable; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.pony.meta.Wearable; import java.util.UUID; @@ -33,8 +33,8 @@ public class Muffin extends AbstractGear implements IStackable { } @Override - public boolean canRender(IModel model, Entity entity) { - return model.isWearing(PonyWearable.MUFFIN); + public boolean canRender(IClientModel model, Entity entity) { + return model.isWearing(Wearable.MUFFIN); } @Override diff --git a/src/client/java/com/minelittlepony/model/gear/SaddleBags.java b/src/client/java/com/minelittlepony/client/model/gear/SaddleBags.java similarity index 82% rename from src/client/java/com/minelittlepony/model/gear/SaddleBags.java rename to src/client/java/com/minelittlepony/client/model/gear/SaddleBags.java index b47ea328..91a368fe 100644 --- a/src/client/java/com/minelittlepony/model/gear/SaddleBags.java +++ b/src/client/java/com/minelittlepony/client/model/gear/SaddleBags.java @@ -1,10 +1,10 @@ -package com.minelittlepony.model.gear; +package com.minelittlepony.client.model.gear; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.model.capabilities.IModelPegasus; -import com.minelittlepony.pony.data.PonyWearable; -import com.minelittlepony.render.model.PlaneRenderer; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.model.IPegasus; +import com.minelittlepony.common.pony.meta.Wearable; import java.util.UUID; @@ -25,7 +25,7 @@ public class SaddleBags extends AbstractGear { float dropAmount = 0; - private IModel model; + private IClientModel model; @Override public void init(float yOffset, float stretch) { @@ -73,13 +73,13 @@ public class SaddleBags extends AbstractGear { } @Override - public void setLivingAnimations(IModel model, Entity entity) { + public void setLivingAnimations(IClientModel model, Entity entity) { this.model = model; hangLow = false; - if (model instanceof IModelPegasus) { - hangLow = model.canFly() && ((IModelPegasus)model).wingsAreOpen(); + if (model instanceof IPegasus) { + hangLow = model.canFly() && ((IPegasus)model).wingsAreOpen(); } } @@ -95,8 +95,8 @@ public class SaddleBags extends AbstractGear { leftBag.rotateAngleX = bodySwing; rightBag.rotateAngleX = bodySwing; - if (model instanceof IModelPegasus && model.isFlying()) { - bodySwing = ((IModelPegasus)model).getWingRotationFactor(ticks) - ROTATE_270; + if (model instanceof IPegasus && model.isFlying()) { + bodySwing = ((IPegasus)model).getWingRotationFactor(ticks) - ROTATE_270; bodySwing /= 10; } @@ -126,8 +126,8 @@ public class SaddleBags extends AbstractGear { } @Override - public boolean canRender(IModel model, Entity entity) { - return model.isWearing(PonyWearable.SADDLE_BAGS); + public boolean canRender(IClientModel model, Entity entity) { + return model.isWearing(Wearable.SADDLE_BAGS); } @Override diff --git a/src/client/java/com/minelittlepony/model/gear/Stetson.java b/src/client/java/com/minelittlepony/client/model/gear/Stetson.java similarity index 76% rename from src/client/java/com/minelittlepony/model/gear/Stetson.java rename to src/client/java/com/minelittlepony/client/model/gear/Stetson.java index 3041fa72..22d22934 100644 --- a/src/client/java/com/minelittlepony/model/gear/Stetson.java +++ b/src/client/java/com/minelittlepony/client/model/gear/Stetson.java @@ -1,13 +1,13 @@ -package com.minelittlepony.model.gear; +package com.minelittlepony.client.model.gear; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.pony.data.PonyWearable; -import com.minelittlepony.render.model.PlaneRenderer; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.client.util.render.plane.PlaneRenderer; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.pony.meta.Wearable; import java.util.UUID; @@ -48,8 +48,8 @@ public class Stetson extends AbstractGear implements IStackable { } @Override - public boolean canRender(IModel model, Entity entity) { - return model.isWearing(PonyWearable.STETSON); + public boolean canRender(IClientModel model, Entity entity) { + return model.isWearing(Wearable.STETSON); } @Override diff --git a/src/client/java/com/minelittlepony/model/gear/WitchHat.java b/src/client/java/com/minelittlepony/client/model/gear/WitchHat.java similarity index 80% rename from src/client/java/com/minelittlepony/model/gear/WitchHat.java rename to src/client/java/com/minelittlepony/client/model/gear/WitchHat.java index 10d423a6..b1450d65 100644 --- a/src/client/java/com/minelittlepony/model/gear/WitchHat.java +++ b/src/client/java/com/minelittlepony/client/model/gear/WitchHat.java @@ -1,12 +1,12 @@ -package com.minelittlepony.model.gear; +package com.minelittlepony.client.model.gear; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.pony.data.PonyWearable; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.pony.meta.Wearable; import java.util.UUID; @@ -39,8 +39,8 @@ public class WitchHat extends AbstractGear implements IStackable { @Override - public boolean canRender(IModel model, Entity entity) { - return model.isWearing(PonyWearable.HAT); + public boolean canRender(IClientModel model, Entity entity) { + return model.isWearing(Wearable.HAT); } @Override diff --git a/src/client/java/com/minelittlepony/client/model/package-info.java b/src/client/java/com/minelittlepony/client/model/package-info.java new file mode 100644 index 00000000..e757659e --- /dev/null +++ b/src/client/java/com/minelittlepony/client/model/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.model; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/model/player/ModelAlicorn.java b/src/client/java/com/minelittlepony/client/model/races/ModelAlicorn.java similarity index 83% rename from src/client/java/com/minelittlepony/model/player/ModelAlicorn.java rename to src/client/java/com/minelittlepony/client/model/races/ModelAlicorn.java index 6b975d5a..e73d0d77 100644 --- a/src/client/java/com/minelittlepony/model/player/ModelAlicorn.java +++ b/src/client/java/com/minelittlepony/client/model/races/ModelAlicorn.java @@ -1,11 +1,11 @@ -package com.minelittlepony.model.player; +package com.minelittlepony.client.model.races; + +import com.minelittlepony.client.model.components.PegasusWings; +import com.minelittlepony.common.model.IPegasus; -import com.minelittlepony.model.components.PegasusWings; import net.minecraft.entity.Entity; -import com.minelittlepony.model.capabilities.IModelPegasus; - -public class ModelAlicorn extends ModelUnicorn implements IModelPegasus { +public class ModelAlicorn extends ModelUnicorn implements IPegasus { public PegasusWings wings; diff --git a/src/client/java/com/minelittlepony/model/player/ModelBatpony.java b/src/client/java/com/minelittlepony/client/model/races/ModelBatpony.java similarity index 74% rename from src/client/java/com/minelittlepony/model/player/ModelBatpony.java rename to src/client/java/com/minelittlepony/client/model/races/ModelBatpony.java index aa13a9c7..749125ec 100644 --- a/src/client/java/com/minelittlepony/model/player/ModelBatpony.java +++ b/src/client/java/com/minelittlepony/client/model/races/ModelBatpony.java @@ -1,8 +1,8 @@ -package com.minelittlepony.model.player; +package com.minelittlepony.client.model.races; -import com.minelittlepony.model.components.BatWings; -import com.minelittlepony.pony.data.PonyWearable; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.components.BatWings; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.pony.meta.Wearable; public class ModelBatpony extends ModelPegasus { @@ -29,8 +29,8 @@ public class ModelBatpony extends ModelPegasus { } @Override - public boolean isWearing(PonyWearable wearable) { - if (wearable == PonyWearable.SADDLE_BAGS) { + public boolean isWearing(Wearable wearable) { + if (wearable == Wearable.SADDLE_BAGS) { return false; } diff --git a/src/client/java/com/minelittlepony/model/player/ModelChangeling.java b/src/client/java/com/minelittlepony/client/model/races/ModelChangeling.java similarity index 74% rename from src/client/java/com/minelittlepony/model/player/ModelChangeling.java rename to src/client/java/com/minelittlepony/client/model/races/ModelChangeling.java index 8b722e07..cdbefb9a 100644 --- a/src/client/java/com/minelittlepony/model/player/ModelChangeling.java +++ b/src/client/java/com/minelittlepony/client/model/races/ModelChangeling.java @@ -1,9 +1,9 @@ -package com.minelittlepony.model.player; +package com.minelittlepony.client.model.races; -import com.minelittlepony.pony.data.PonyWearable; import net.minecraft.util.math.MathHelper; -import com.minelittlepony.model.components.BugWings; +import com.minelittlepony.client.model.components.BugWings; +import com.minelittlepony.common.pony.meta.Wearable; public class ModelChangeling extends ModelAlicorn { @@ -30,8 +30,8 @@ public class ModelChangeling extends ModelAlicorn { } @Override - public boolean isWearing(PonyWearable wearable) { - if (wearable == PonyWearable.SADDLE_BAGS) { + public boolean isWearing(Wearable wearable) { + if (wearable == Wearable.SADDLE_BAGS) { return false; } diff --git a/src/client/java/com/minelittlepony/model/player/ModelEarthPony.java b/src/client/java/com/minelittlepony/client/model/races/ModelEarthPony.java similarity index 90% rename from src/client/java/com/minelittlepony/model/player/ModelEarthPony.java rename to src/client/java/com/minelittlepony/client/model/races/ModelEarthPony.java index ed7625e9..cd6e714f 100644 --- a/src/client/java/com/minelittlepony/model/player/ModelEarthPony.java +++ b/src/client/java/com/minelittlepony/client/model/races/ModelEarthPony.java @@ -1,7 +1,7 @@ -package com.minelittlepony.model.player; +package com.minelittlepony.client.model.races; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.util.render.PonyRenderer; import net.minecraft.entity.Entity; diff --git a/src/client/java/com/minelittlepony/model/player/ModelPegasus.java b/src/client/java/com/minelittlepony/client/model/races/ModelPegasus.java similarity index 81% rename from src/client/java/com/minelittlepony/model/player/ModelPegasus.java rename to src/client/java/com/minelittlepony/client/model/races/ModelPegasus.java index 523bed4e..981ac926 100644 --- a/src/client/java/com/minelittlepony/model/player/ModelPegasus.java +++ b/src/client/java/com/minelittlepony/client/model/races/ModelPegasus.java @@ -1,11 +1,11 @@ -package com.minelittlepony.model.player; +package com.minelittlepony.client.model.races; + +import com.minelittlepony.client.model.components.PegasusWings; +import com.minelittlepony.common.model.IPegasus; -import com.minelittlepony.model.components.PegasusWings; import net.minecraft.entity.Entity; -import com.minelittlepony.model.capabilities.IModelPegasus; - -public class ModelPegasus extends ModelEarthPony implements IModelPegasus { +public class ModelPegasus extends ModelEarthPony implements IPegasus { public PegasusWings wings; diff --git a/src/client/java/com/minelittlepony/model/player/ModelUnicorn.java b/src/client/java/com/minelittlepony/client/model/races/ModelUnicorn.java similarity index 94% rename from src/client/java/com/minelittlepony/model/player/ModelUnicorn.java rename to src/client/java/com/minelittlepony/client/model/races/ModelUnicorn.java index 658696b8..f5116f63 100644 --- a/src/client/java/com/minelittlepony/model/player/ModelUnicorn.java +++ b/src/client/java/com/minelittlepony/client/model/races/ModelUnicorn.java @@ -1,18 +1,17 @@ -package com.minelittlepony.model.player; +package com.minelittlepony.client.model.races; -import com.minelittlepony.model.components.UnicornHorn; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.components.UnicornHorn; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.IUnicorn; import net.minecraft.entity.Entity; import net.minecraft.util.EnumHandSide; import net.minecraft.util.math.MathHelper; -import com.minelittlepony.model.capabilities.IModelUnicorn; - /** * Used for both unicorns and alicorns since there's no logical way to keep them distinct and not duplicate stuff. */ -public class ModelUnicorn extends ModelEarthPony implements IModelUnicorn { +public class ModelUnicorn extends ModelEarthPony implements IUnicorn { public PonyRenderer unicornArmRight; public PonyRenderer unicornArmLeft; diff --git a/src/client/java/com/minelittlepony/model/player/ModelZebra.java b/src/client/java/com/minelittlepony/client/model/races/ModelZebra.java similarity index 81% rename from src/client/java/com/minelittlepony/model/player/ModelZebra.java rename to src/client/java/com/minelittlepony/client/model/races/ModelZebra.java index 53edb567..5bc05671 100644 --- a/src/client/java/com/minelittlepony/model/player/ModelZebra.java +++ b/src/client/java/com/minelittlepony/client/model/races/ModelZebra.java @@ -1,11 +1,12 @@ -package com.minelittlepony.model.player; +package com.minelittlepony.client.model.races; import net.minecraft.client.renderer.GlStateManager; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.armour.ModelPonyArmor; -import com.minelittlepony.model.armour.PonyArmor; -import com.minelittlepony.render.model.PonyRenderer; +import com.minelittlepony.client.model.armour.ModelPonyArmor; +import com.minelittlepony.client.model.armour.PonyArmor; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.model.armour.IEquestrianArmour; public class ModelZebra extends ModelEarthPony { @@ -16,7 +17,7 @@ public class ModelZebra extends ModelEarthPony { } @Override - public PonyArmor createArmour() { + public IEquestrianArmour createArmour() { return new PonyArmor(new Armour(), new Armour()); } diff --git a/src/client/java/com/minelittlepony/client/model/races/PlayerModels.java b/src/client/java/com/minelittlepony/client/model/races/PlayerModels.java new file mode 100644 index 00000000..6a0e805a --- /dev/null +++ b/src/client/java/com/minelittlepony/client/model/races/PlayerModels.java @@ -0,0 +1,102 @@ +package com.minelittlepony.client.model.races; + +import com.google.common.collect.Maps; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelSeapony; +import com.minelittlepony.client.render.entities.player.RenderPonyPlayer; +import com.minelittlepony.client.render.entities.player.RenderSeaponyPlayer; +import com.minelittlepony.common.pony.meta.Race; + +import net.minecraft.client.renderer.entity.RenderManager; + +import com.voxelmodpack.hdskins.VanillaModels; + +import java.util.Map; + +public enum PlayerModels { + /** + * The default non-pony model. This is typically handled my the vanilla renderer. + */ + HUMAN(VanillaModels.DEFAULT, Race.HUMAN, ModelEarthPony::new), + EARTH("earthpony", Race.EARTH, ModelEarthPony::new), + PEGASUS("pegasus", Race.PEGASUS, ModelPegasus::new), + BATPONY("batpony", Race.BATPONY, ModelBatpony::new), + UNICORN("unicorn", Race.UNICORN, ModelUnicorn::new), + ALICORN("alicorn", Race.ALICORN, ModelAlicorn::new), + CHANGELING("changeling", Race.CHANGELING, ModelChangeling::new), + ZEBRA("zebra", Race.ZEBRA, ModelZebra::new), + SEAPONY("seapony", Race.SEAPONY, a -> new ModelSeapony()) { + @Override + public RenderPonyPlayer createRenderer(RenderManager manager, boolean slimArms) { + return new RenderSeaponyPlayer(manager, slimArms, PlayerModels.UNICORN.getModel(slimArms), getModel(slimArms)); + } + }; + + private static Map raceModelsMap = Maps.newEnumMap(Race.class); + + static { + for (PlayerModels i : values()) { + raceModelsMap.put(i.race, i); + } + } + + private final ModelResolver resolver; + + private ModelWrapper normal; + private ModelWrapper slim; + + private final String normalKey, slimKey; + + private final Race race; + + PlayerModels(String key, Race race, ModelResolver resolver) { + this(key, VanillaModels.SLIM + key, race, resolver); + } + + PlayerModels(String normalKey, String slimKey, Race race, ModelResolver resolver) { + this.normalKey = normalKey; + this.slimKey = slimKey; + + this.resolver = resolver; + + this.race = race; + } + + public ModelWrapper getModel(boolean isSlim) { + + if (isSlim) { + if (slim == null) { + slim = new ModelWrapper(resolver.resolve(isSlim)); + } + + return slim; + } + + if (normal == null) { + normal = new ModelWrapper(resolver.resolve(isSlim)); + } + + return normal; + } + + public String getId(boolean useSlimArms) { + return useSlimArms ? slimKey : normalKey; + } + + public RenderPonyPlayer createRenderer(RenderManager manager, boolean slimArms) { + return new RenderPonyPlayer(manager, slimArms, getModel(slimArms)); + } + + public static PlayerModels forRace(Race race) { + return raceModelsMap.getOrDefault(race.getAlias(), HUMAN); + } + + /** + * FIXME: PMAPI fields are null when the game starts. + */ + @FunctionalInterface + static interface ModelResolver { + AbstractPonyModel resolve(boolean slim); + } +} diff --git a/src/client/java/com/minelittlepony/model/capabilities/package-info.java b/src/client/java/com/minelittlepony/client/model/races/package-info.java similarity index 77% rename from src/client/java/com/minelittlepony/model/capabilities/package-info.java rename to src/client/java/com/minelittlepony/client/model/races/package-info.java index 85345172..d10e7ce3 100644 --- a/src/client/java/com/minelittlepony/model/capabilities/package-info.java +++ b/src/client/java/com/minelittlepony/client/model/races/package-info.java @@ -1,6 +1,6 @@ @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -package com.minelittlepony.model.capabilities; +package com.minelittlepony.client.model.races; import mcp.MethodsReturnNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/mixin/package-info.java b/src/client/java/com/minelittlepony/client/package-info.java similarity index 82% rename from src/client/java/com/minelittlepony/mixin/package-info.java rename to src/client/java/com/minelittlepony/client/package-info.java index 22cdf129..a25a75c9 100644 --- a/src/client/java/com/minelittlepony/mixin/package-info.java +++ b/src/client/java/com/minelittlepony/client/package-info.java @@ -1,6 +1,6 @@ @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -package com.minelittlepony.mixin; +package com.minelittlepony.client; import mcp.MethodsReturnNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/pony/data/Pony.java b/src/client/java/com/minelittlepony/client/pony/Pony.java similarity index 92% rename from src/client/java/com/minelittlepony/pony/data/Pony.java rename to src/client/java/com/minelittlepony/client/pony/Pony.java index f3d54d22..d019a056 100644 --- a/src/client/java/com/minelittlepony/pony/data/Pony.java +++ b/src/client/java/com/minelittlepony/client/pony/Pony.java @@ -1,9 +1,14 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.client.pony; import com.google.common.base.MoreObjects; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.PonyRenderManager; -import com.minelittlepony.ducks.IRenderPony; +import com.minelittlepony.client.PonyRenderManager; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.transform.PonyTransformation; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPony; +import com.minelittlepony.common.pony.IPonyData; +import com.minelittlepony.common.pony.meta.Race; +import com.minelittlepony.common.pony.meta.Size; import com.minelittlepony.util.chron.Touchable; import com.voxelmodpack.hdskins.resources.texture.DynamicTextureImage; import com.voxelmodpack.hdskins.resources.texture.IBufferedTexture; @@ -156,7 +161,7 @@ public class Pony extends Touchable implements IPony { } protected Vec3d getVisualEyePosition(EntityLivingBase entity) { - PonySize size = entity.isChild() ? PonySize.FOAL : metadata.getSize(); + Size size = entity.isChild() ? Size.FOAL : metadata.getSize(); return new Vec3d(entity.posX, entity.posY + (double) entity.getEyeHeight() * size.getScaleFactor(), entity.posZ); } @@ -175,7 +180,7 @@ public class Pony extends Touchable implements IPony { } @Override - public PonyRace getRace(boolean ignorePony) { + public Race getRace(boolean ignorePony) { return metadata.getRace().getEffectiveRace(ignorePony); } @@ -212,7 +217,7 @@ public class Pony extends Touchable implements IPony { if (ridingPony != null) { EntityLivingBase ridee = (EntityLivingBase)entity.getRidingEntity(); - Vec3d offset = ridingPony.getMetadata().getSize().getTranformation().getRiderOffset(); + Vec3d offset = PonyTransformation.forSize(ridingPony.getMetadata().getSize()).getRiderOffset(); float scale = ridingPony.getMetadata().getSize().getScaleFactor(); return ridingPony.getAbsoluteRidingOffset(ridee) diff --git a/src/client/java/com/minelittlepony/pony/data/PonyData.java b/src/client/java/com/minelittlepony/client/pony/PonyData.java similarity index 66% rename from src/client/java/com/minelittlepony/pony/data/PonyData.java rename to src/client/java/com/minelittlepony/client/pony/PonyData.java index 3582a845..ea2bbc86 100644 --- a/src/client/java/com/minelittlepony/pony/data/PonyData.java +++ b/src/client/java/com/minelittlepony/client/pony/PonyData.java @@ -1,10 +1,17 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.client.pony; import net.minecraft.client.resources.data.IMetadataSection; import com.google.common.base.MoreObjects; -import com.minelittlepony.model.anim.BasicEasingInterpolator; -import com.minelittlepony.model.anim.IInterpolator; +import com.minelittlepony.common.pony.IPonyData; +import com.minelittlepony.common.pony.meta.Gender; +import com.minelittlepony.common.pony.meta.Race; +import com.minelittlepony.common.pony.meta.Wearable; +import com.minelittlepony.common.pony.meta.Size; +import com.minelittlepony.common.pony.meta.TailLength; +import com.minelittlepony.common.pony.meta.TriggerPixels; +import com.minelittlepony.util.animation.BasicEasingInterpolator; +import com.minelittlepony.util.animation.IInterpolator; import java.awt.image.BufferedImage; import java.util.UUID; @@ -18,22 +25,22 @@ import javax.annotation.concurrent.Immutable; */ @Immutable public class PonyData implements IPonyData, IMetadataSection { - private final PonyRace race; - private final TailLengths tailSize; - private final PonyGender gender; - private final PonySize size; + private final Race race; + private final TailLength tailSize; + private final Gender gender; + private final Size size; private final int glowColor; private final boolean[] wearables; public PonyData() { - race = PonyRace.HUMAN; - tailSize = TailLengths.FULL; - gender = PonyGender.MARE; - size = PonySize.NORMAL; + race = Race.HUMAN; + tailSize = TailLength.FULL; + gender = Gender.MARE; + size = Size.NORMAL; glowColor = 0x4444aa; - wearables = new boolean[PonyWearable.values().length]; + wearables = new boolean[Wearable.values().length]; } private PonyData(BufferedImage image) { @@ -47,22 +54,22 @@ public class PonyData implements IPonyData, IMetadataSection { } @Override - public PonyRace getRace() { + public Race getRace() { return race; } @Override - public TailLengths getTail() { + public TailLength getTail() { return tailSize; } @Override - public PonyGender getGender() { + public Gender getGender() { return gender; } @Override - public PonySize getSize() { + public Size getSize() { return size.getEffectiveSize(); } @@ -77,7 +84,7 @@ public class PonyData implements IPonyData, IMetadataSection { } @Override - public boolean isWearing(PonyWearable wearable) { + public boolean isWearing(Wearable wearable) { return wearables[wearable.ordinal()]; } @@ -88,7 +95,7 @@ public class PonyData implements IPonyData, IMetadataSection { .add("tailSize", tailSize) .add("gender", gender) .add("size", size) - .add("wearables", PonyWearable.flags(wearables)) + .add("wearables", Wearable.flags(wearables)) .add("glowColor", "#" + Integer.toHexString(glowColor)) .toString(); } diff --git a/src/client/java/com/minelittlepony/pony/data/PonyDataSerialiser.java b/src/client/java/com/minelittlepony/client/pony/PonyDataSerialiser.java similarity index 94% rename from src/client/java/com/minelittlepony/pony/data/PonyDataSerialiser.java rename to src/client/java/com/minelittlepony/client/pony/PonyDataSerialiser.java index 0083e9c2..7ec677f4 100644 --- a/src/client/java/com/minelittlepony/pony/data/PonyDataSerialiser.java +++ b/src/client/java/com/minelittlepony/client/pony/PonyDataSerialiser.java @@ -1,4 +1,4 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.client.pony; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonElement; diff --git a/src/client/java/com/minelittlepony/pony/data/PonyManager.java b/src/client/java/com/minelittlepony/client/pony/PonyManager.java similarity index 96% rename from src/client/java/com/minelittlepony/pony/data/PonyManager.java rename to src/client/java/com/minelittlepony/client/pony/PonyManager.java index 5bcc3ab3..56a1948c 100644 --- a/src/client/java/com/minelittlepony/pony/data/PonyManager.java +++ b/src/client/java/com/minelittlepony/client/pony/PonyManager.java @@ -1,10 +1,13 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.client.pony; import com.google.common.collect.Lists; import com.google.gson.Gson; import com.google.gson.JsonParseException; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.PonyConfig; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPony; +import com.minelittlepony.common.pony.IPonyManager; +import com.minelittlepony.common.settings.PonyConfig; +import com.minelittlepony.common.settings.PonyLevel; import com.minelittlepony.util.chron.ChronicCache; import com.minelittlepony.util.math.MathUtil; import com.voxelmodpack.hdskins.ISkinCacheClearListener; diff --git a/src/client/java/com/minelittlepony/model/package-info.java b/src/client/java/com/minelittlepony/client/pony/package-info.java similarity index 80% rename from src/client/java/com/minelittlepony/model/package-info.java rename to src/client/java/com/minelittlepony/client/pony/package-info.java index 6dc6a541..02842e96 100644 --- a/src/client/java/com/minelittlepony/model/package-info.java +++ b/src/client/java/com/minelittlepony/client/pony/package-info.java @@ -1,6 +1,6 @@ @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -package com.minelittlepony.model; +package com.minelittlepony.client.pony; import mcp.MethodsReturnNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/DebugBoundingBoxRenderer.java b/src/client/java/com/minelittlepony/client/render/DebugBoundingBoxRenderer.java similarity index 94% rename from src/client/java/com/minelittlepony/render/DebugBoundingBoxRenderer.java rename to src/client/java/com/minelittlepony/client/render/DebugBoundingBoxRenderer.java index fdebe5ae..68a84c9b 100644 --- a/src/client/java/com/minelittlepony/render/DebugBoundingBoxRenderer.java +++ b/src/client/java/com/minelittlepony/client/render/DebugBoundingBoxRenderer.java @@ -1,4 +1,4 @@ -package com.minelittlepony.render; +package com.minelittlepony.client.render; import net.minecraft.client.Minecraft; @@ -7,7 +7,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.AxisAlignedBB; -import com.minelittlepony.pony.data.IPony; +import com.minelittlepony.common.pony.IPony; import static net.minecraft.client.renderer.GlStateManager.*; diff --git a/src/client/java/com/minelittlepony/render/FrustrumCheck.java b/src/client/java/com/minelittlepony/client/render/FrustrumCheck.java similarity index 91% rename from src/client/java/com/minelittlepony/render/FrustrumCheck.java rename to src/client/java/com/minelittlepony/client/render/FrustrumCheck.java index 175cf1a8..5e0eda87 100644 --- a/src/client/java/com/minelittlepony/render/FrustrumCheck.java +++ b/src/client/java/com/minelittlepony/client/render/FrustrumCheck.java @@ -1,10 +1,10 @@ -package com.minelittlepony.render; +package com.minelittlepony.client.render; import net.minecraft.client.renderer.culling.ICamera; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.math.AxisAlignedBB; -import com.minelittlepony.pony.data.IPony; +import com.minelittlepony.common.pony.IPony; public class FrustrumCheck implements ICamera { diff --git a/src/client/java/com/minelittlepony/render/LevitatingItemRenderer.java b/src/client/java/com/minelittlepony/client/render/LevitatingItemRenderer.java similarity index 94% rename from src/client/java/com/minelittlepony/render/LevitatingItemRenderer.java rename to src/client/java/com/minelittlepony/client/render/LevitatingItemRenderer.java index b943d4b8..bd8027ea 100644 --- a/src/client/java/com/minelittlepony/render/LevitatingItemRenderer.java +++ b/src/client/java/com/minelittlepony/client/render/LevitatingItemRenderer.java @@ -1,12 +1,12 @@ -package com.minelittlepony.render; +package com.minelittlepony.client.render; import org.lwjgl.opengl.GL14; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.ducks.IRenderItem; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.render.skull.PonySkullRenderer; -import com.minelittlepony.util.render.Color; +import com.minelittlepony.client.ducks.IRenderItem; +import com.minelittlepony.client.render.tileentities.skull.PonySkullRenderer; +import com.minelittlepony.client.util.render.Color; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPony; import com.mumfrey.liteloader.client.overlays.IMinecraft; import net.minecraft.client.Minecraft; diff --git a/src/client/java/com/minelittlepony/render/RenderPony.java b/src/client/java/com/minelittlepony/client/render/RenderPony.java similarity index 93% rename from src/client/java/com/minelittlepony/render/RenderPony.java rename to src/client/java/com/minelittlepony/client/render/RenderPony.java index 3256cda4..5bab850d 100644 --- a/src/client/java/com/minelittlepony/render/RenderPony.java +++ b/src/client/java/com/minelittlepony/client/render/RenderPony.java @@ -1,12 +1,12 @@ -package com.minelittlepony.render; +package com.minelittlepony.client.render; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.PonyRenderManager; -import com.minelittlepony.ducks.IRenderPony; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.ModelWrapper; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.transform.PonyPosture; +import com.minelittlepony.client.PonyRenderManager; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.transform.PonyPosture; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPony; import com.minelittlepony.util.math.MathUtil; import net.minecraft.client.renderer.GlStateManager; diff --git a/src/client/java/com/minelittlepony/render/RenderPonyMob.java b/src/client/java/com/minelittlepony/client/render/RenderPonyMob.java similarity index 86% rename from src/client/java/com/minelittlepony/render/RenderPonyMob.java rename to src/client/java/com/minelittlepony/client/render/RenderPonyMob.java index 5758c573..cb80ab0f 100644 --- a/src/client/java/com/minelittlepony/render/RenderPonyMob.java +++ b/src/client/java/com/minelittlepony/client/render/RenderPonyMob.java @@ -1,15 +1,15 @@ -package com.minelittlepony.render; +package com.minelittlepony.client.render; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.ducks.IRenderPony; -import com.minelittlepony.model.ModelWrapper; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.render.layer.LayerGear; -import com.minelittlepony.render.layer.LayerHeldPonyItem; -import com.minelittlepony.render.layer.LayerHeldPonyItemMagical; -import com.minelittlepony.render.layer.LayerPonyArmor; -import com.minelittlepony.render.layer.LayerPonyCustomHead; -import com.minelittlepony.render.layer.LayerPonyElytra; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.render.layer.LayerGear; +import com.minelittlepony.client.render.layer.LayerHeldPonyItem; +import com.minelittlepony.client.render.layer.LayerHeldPonyItemMagical; +import com.minelittlepony.client.render.layer.LayerPonyArmor; +import com.minelittlepony.client.render.layer.LayerPonyCustomHead; +import com.minelittlepony.client.render.layer.LayerPonyElytra; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPony; import com.voxelmodpack.hdskins.HDSkinManager; import net.minecraft.client.renderer.GlStateManager; diff --git a/src/client/java/com/minelittlepony/render/ponies/MobRenderers.java b/src/client/java/com/minelittlepony/client/render/entities/MobRenderers.java similarity index 93% rename from src/client/java/com/minelittlepony/render/ponies/MobRenderers.java rename to src/client/java/com/minelittlepony/client/render/entities/MobRenderers.java index c23610a5..dea67d51 100644 --- a/src/client/java/com/minelittlepony/render/ponies/MobRenderers.java +++ b/src/client/java/com/minelittlepony/client/render/entities/MobRenderers.java @@ -1,8 +1,8 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.PonyRenderManager; -import com.minelittlepony.settings.SensibleConfig.Setting; +import com.minelittlepony.client.PonyRenderManager; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.settings.SensibleConfig.Setting; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderManager; @@ -34,7 +34,7 @@ public enum MobRenderers implements Setting { PIGZOMBIES { @Override public void register(boolean state, PonyRenderManager pony, RenderManager manager) { - pony.switchRenderer(state, manager, EntityPigZombie.class, new RenderPonyPigman(manager)); + pony.switchRenderer(state, manager, EntityPigZombie.class, new RenderPonyZombie.Pigman(manager)); } }, SKELETONS { diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderEnderStallion.java b/src/client/java/com/minelittlepony/client/render/entities/RenderEnderStallion.java similarity index 78% rename from src/client/java/com/minelittlepony/render/ponies/RenderEnderStallion.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderEnderStallion.java index f09c727d..b5a09d62 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderEnderStallion.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderEnderStallion.java @@ -1,12 +1,12 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.model.ponies.ModelEnderStallion; -import com.minelittlepony.render.RenderPonyMob; -import com.minelittlepony.render.layer.LayerEyeGlow; -import com.minelittlepony.render.layer.LayerHeldPonyItem; -import com.minelittlepony.render.layer.LayerHeldPonyItemMagical; -import com.minelittlepony.render.layer.LayerEyeGlow.IGlowingRenderer; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelEnderStallion; +import com.minelittlepony.client.render.RenderPonyMob; +import com.minelittlepony.client.render.layer.LayerEyeGlow; +import com.minelittlepony.client.render.layer.LayerHeldPonyItem; +import com.minelittlepony.client.render.layer.LayerHeldPonyItemMagical; +import com.minelittlepony.client.render.layer.LayerEyeGlow.IGlowingRenderer; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.entity.RenderManager; @@ -24,8 +24,10 @@ public class RenderEnderStallion extends RenderPonyMob implement private final Random rnd = new Random(); + private static final ModelWrapper MODEL_WRAPPER = new ModelWrapper(new ModelEnderStallion()); + public RenderEnderStallion(RenderManager manager) { - super(manager, PMAPI.enderman); + super(manager, MODEL_WRAPPER); } @Override diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonyGuardian.java b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyGuardian.java similarity index 84% rename from src/client/java/com/minelittlepony/render/ponies/RenderPonyGuardian.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderPonyGuardian.java index 977fd048..473b8e92 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonyGuardian.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyGuardian.java @@ -1,9 +1,10 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; import javax.annotation.Nonnull; -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.RenderPonyMob; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelSeapony; +import com.minelittlepony.client.render.RenderPonyMob; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderGuardian; @@ -16,13 +17,15 @@ public class RenderPonyGuardian extends RenderGuardian { public static final ResourceLocation SEAPONY = new ResourceLocation("minelittlepony", "textures/entity/seapony.png"); + private static final ModelWrapper MODEL_WRAPPER = new ModelWrapper(new ModelSeapony()); + private RenderPonyMob.Proxy ponyRenderer; public RenderPonyGuardian(RenderManager manager) { super(manager); - mainModel = PMAPI.seapony.getBody(); + mainModel = MODEL_WRAPPER.getBody(); - ponyRenderer = new RenderPonyMob.Proxy(layerRenderers, manager, PMAPI.seapony) { + ponyRenderer = new RenderPonyMob.Proxy(layerRenderers, manager, MODEL_WRAPPER) { @Override public ResourceLocation getTexture(EntityGuardian entity) { return RenderPonyGuardian.this.getTexture(entity); diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonyIllager.java b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyIllager.java similarity index 86% rename from src/client/java/com/minelittlepony/render/ponies/RenderPonyIllager.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderPonyIllager.java index f21ae79d..7836b5e4 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonyIllager.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyIllager.java @@ -1,9 +1,10 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.RenderPonyMob; -import com.minelittlepony.render.layer.LayerHeldItemIllager; -import com.minelittlepony.render.layer.LayerHeldPonyItem; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelIllagerPony; +import com.minelittlepony.client.render.RenderPonyMob; +import com.minelittlepony.client.render.layer.LayerHeldItemIllager; +import com.minelittlepony.client.render.layer.LayerHeldPonyItem; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderManager; @@ -21,8 +22,10 @@ public abstract class RenderPonyIllager extends Rende public static final ResourceLocation EVOKER = new ResourceLocation("minelittlepony", "textures/entity/illager/evoker_pony.png"); public static final ResourceLocation VINDICATOR = new ResourceLocation("minelittlepony", "textures/entity/illager/vindicator_pony.png"); + private static final ModelWrapper MODEL_WRAPPER = new ModelWrapper(new ModelIllagerPony()); + public RenderPonyIllager(RenderManager manager) { - super(manager, PMAPI.illager); + super(manager, MODEL_WRAPPER); } @Override diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonySkeleton.java b/src/client/java/com/minelittlepony/client/render/entities/RenderPonySkeleton.java similarity index 81% rename from src/client/java/com/minelittlepony/render/ponies/RenderPonySkeleton.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderPonySkeleton.java index 6faa5751..9c7b9307 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonySkeleton.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderPonySkeleton.java @@ -1,8 +1,10 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; + +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelSkeletonPony; +import com.minelittlepony.client.render.RenderPonyMob; +import com.minelittlepony.client.render.layer.LayerPonyStrayOverlay; -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.RenderPonyMob; -import com.minelittlepony.render.layer.LayerPonyStrayOverlay; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.monster.AbstractSkeleton; @@ -16,8 +18,10 @@ public class RenderPonySkeleton extends Rende public static final ResourceLocation WITHER = new ResourceLocation("minelittlepony", "textures/entity/skeleton/skeleton_wither_pony.png"); public static final ResourceLocation STRAY = new ResourceLocation("minelittlepony", "textures/entity/skeleton/stray_pony.png"); + private static final ModelWrapper MODEL_WRAPPER = new ModelWrapper(new ModelSkeletonPony()); + public RenderPonySkeleton(RenderManager manager) { - super(manager, PMAPI.skeleton); + super(manager, MODEL_WRAPPER); } @Override diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonyVex.java b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyVex.java similarity index 90% rename from src/client/java/com/minelittlepony/render/ponies/RenderPonyVex.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderPonyVex.java index 7341de76..66b4c120 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonyVex.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyVex.java @@ -1,6 +1,4 @@ -package com.minelittlepony.render.ponies; - -import com.minelittlepony.model.ponies.ModelBreezie; +package com.minelittlepony.client.render.entities; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderBiped; @@ -8,6 +6,8 @@ import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.monster.EntityVex; import net.minecraft.util.ResourceLocation; +import com.minelittlepony.client.model.entities.ModelBreezie; + /** * AKA a breezie :D */ diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonyVillager.java b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyVillager.java similarity index 76% rename from src/client/java/com/minelittlepony/render/ponies/RenderPonyVillager.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderPonyVillager.java index 90a0ea16..811ea80a 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonyVillager.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyVillager.java @@ -1,10 +1,11 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.RenderPonyMob; -import com.minelittlepony.util.render.FormattedTextureSupplier; -import com.minelittlepony.util.render.ITextureSupplier; -import com.minelittlepony.util.render.IntStringMapper; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelVillagerPony; +import com.minelittlepony.client.render.RenderPonyMob; +import com.minelittlepony.util.resources.FormattedTextureSupplier; +import com.minelittlepony.util.resources.ITextureSupplier; +import com.minelittlepony.util.resources.IntStringMapper; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderManager; @@ -26,8 +27,10 @@ public class RenderPonyVillager extends RenderPonyMob { private static final ITextureSupplier PROFESSIONS = new VillagerProfessionTextureCache(FORMATTER, MAPPER, DEFAULT); + private static final ModelWrapper MODEL_WRAPPER = new ModelWrapper(new ModelVillagerPony()); + public RenderPonyVillager(RenderManager manager) { - super(manager, PMAPI.villager); + super(manager, MODEL_WRAPPER); } @Override diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonyWitch.java b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyWitch.java similarity index 76% rename from src/client/java/com/minelittlepony/render/ponies/RenderPonyWitch.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderPonyWitch.java index 76890f1c..e70e19b0 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonyWitch.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyWitch.java @@ -1,8 +1,9 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.RenderPonyMob; -import com.minelittlepony.render.layer.LayerHeldPonyItem; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelWitchPony; +import com.minelittlepony.client.render.RenderPonyMob; +import com.minelittlepony.client.render.layer.LayerHeldPonyItem; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; @@ -16,8 +17,10 @@ public class RenderPonyWitch extends RenderPonyMob { private static final ResourceLocation WITCH_TEXTURES = new ResourceLocation("minelittlepony", "textures/entity/witch_pony.png"); + private static final ModelWrapper MODEL_WRAPPER = new ModelWrapper(new ModelWitchPony()); + public RenderPonyWitch(RenderManager manager) { - super(manager, PMAPI.witch); + super(manager, MODEL_WRAPPER); } @Override diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonyZombie.java b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyZombie.java similarity index 66% rename from src/client/java/com/minelittlepony/render/ponies/RenderPonyZombie.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderPonyZombie.java index 08233027..91702804 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonyZombie.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyZombie.java @@ -1,11 +1,14 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; + +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelZombiePony; +import com.minelittlepony.client.render.RenderPonyMob; -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.RenderPonyMob; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.monster.EntityGiantZombie; import net.minecraft.entity.monster.EntityHusk; +import net.minecraft.entity.monster.EntityPigZombie; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.util.ResourceLocation; @@ -13,9 +16,12 @@ public class RenderPonyZombie extends RenderPonyMob public static final ResourceLocation ZOMBIE = new ResourceLocation("minelittlepony", "textures/entity/zombie/zombie_pony.png"); public static final ResourceLocation HUSK = new ResourceLocation("minelittlepony", "textures/entity/zombie/husk_pony.png"); + public static final ResourceLocation PIGMAN = new ResourceLocation("minelittlepony", "textures/entity/zombie/zombie_pigman_pony.png"); + + private static final ModelWrapper MODEL_WRAPPER = new ModelWrapper(new ModelZombiePony()); public RenderPonyZombie(RenderManager manager) { - super(manager, PMAPI.zombie); + super(manager, MODEL_WRAPPER); } @Override @@ -23,6 +29,18 @@ public class RenderPonyZombie extends RenderPonyMob return ZOMBIE; } + public static class Pigman extends RenderPonyZombie { + + public Pigman(RenderManager manager) { + super(manager); + } + + @Override + public ResourceLocation getTexture(EntityPigZombie entity) { + return PIGMAN; + } + } + public static class Husk extends RenderPonyZombie { public Husk(RenderManager manager) { @@ -45,7 +63,7 @@ public class RenderPonyZombie extends RenderPonyMob public static class Giant extends RenderPonyMob { public Giant(RenderManager manager) { - super(manager, PMAPI.zombie); + super(manager, MODEL_WRAPPER); } @Override diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonyZombieVillager.java b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyZombieVillager.java similarity index 76% rename from src/client/java/com/minelittlepony/render/ponies/RenderPonyZombieVillager.java rename to src/client/java/com/minelittlepony/client/render/entities/RenderPonyZombieVillager.java index dc98e5d4..2b091201 100644 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonyZombieVillager.java +++ b/src/client/java/com/minelittlepony/client/render/entities/RenderPonyZombieVillager.java @@ -1,10 +1,11 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.RenderPonyMob; -import com.minelittlepony.util.render.FormattedTextureSupplier; -import com.minelittlepony.util.render.ITextureSupplier; -import com.minelittlepony.util.render.IntStringMapper; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.entities.ModelZombieVillagerPony; +import com.minelittlepony.client.render.RenderPonyMob; +import com.minelittlepony.util.resources.FormattedTextureSupplier; +import com.minelittlepony.util.resources.ITextureSupplier; +import com.minelittlepony.util.resources.IntStringMapper; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.monster.EntityZombieVillager; @@ -26,8 +27,10 @@ public class RenderPonyZombieVillager extends RenderPonyMob PROFESSIONS = new VillagerProfessionTextureCache(FORMATTER, MAPPER, DEFAULT); + private static final ModelWrapper MODEL_WRAPPER = new ModelWrapper(new ModelZombieVillagerPony()); + public RenderPonyZombieVillager(RenderManager manager) { - super(manager, PMAPI.zombieVillager); + super(manager, MODEL_WRAPPER); } @Override diff --git a/src/client/java/com/minelittlepony/render/ponies/VillagerProfessionTextureCache.java b/src/client/java/com/minelittlepony/client/render/entities/VillagerProfessionTextureCache.java similarity index 92% rename from src/client/java/com/minelittlepony/render/ponies/VillagerProfessionTextureCache.java rename to src/client/java/com/minelittlepony/client/render/entities/VillagerProfessionTextureCache.java index 99e0fa6e..fd308f57 100644 --- a/src/client/java/com/minelittlepony/render/ponies/VillagerProfessionTextureCache.java +++ b/src/client/java/com/minelittlepony/client/render/entities/VillagerProfessionTextureCache.java @@ -1,10 +1,10 @@ -package com.minelittlepony.render.ponies; +package com.minelittlepony.client.render.entities; import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.util.render.ITextureSupplier; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.util.resources.ITextureSupplier; import java.io.IOException; import java.util.HashMap; diff --git a/src/client/java/com/minelittlepony/client/render/entities/package-info.java b/src/client/java/com/minelittlepony/client/render/entities/package-info.java new file mode 100644 index 00000000..588ac2fa --- /dev/null +++ b/src/client/java/com/minelittlepony/client/render/entities/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.render.entities; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/player/RenderPonyPlayer.java b/src/client/java/com/minelittlepony/client/render/entities/player/RenderPonyPlayer.java similarity index 86% rename from src/client/java/com/minelittlepony/render/player/RenderPonyPlayer.java rename to src/client/java/com/minelittlepony/client/render/entities/player/RenderPonyPlayer.java index 46bc2942..dc5e89ad 100644 --- a/src/client/java/com/minelittlepony/render/player/RenderPonyPlayer.java +++ b/src/client/java/com/minelittlepony/client/render/entities/player/RenderPonyPlayer.java @@ -1,19 +1,19 @@ -package com.minelittlepony.render.player; +package com.minelittlepony.client.render.entities.player; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.ducks.IRenderPony; -import com.minelittlepony.model.ModelWrapper; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.render.DebugBoundingBoxRenderer; -import com.minelittlepony.render.RenderPony; -import com.minelittlepony.render.layer.LayerDJPon3Head; -import com.minelittlepony.render.layer.LayerEntityOnPonyShoulder; -import com.minelittlepony.render.layer.LayerGear; -import com.minelittlepony.render.layer.LayerHeldPonyItemMagical; -import com.minelittlepony.render.layer.LayerPonyArmor; -import com.minelittlepony.render.layer.LayerPonyCape; -import com.minelittlepony.render.layer.LayerPonyCustomHead; -import com.minelittlepony.render.layer.LayerPonyElytra; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.render.DebugBoundingBoxRenderer; +import com.minelittlepony.client.render.RenderPony; +import com.minelittlepony.client.render.layer.LayerDJPon3Head; +import com.minelittlepony.client.render.layer.LayerEntityOnPonyShoulder; +import com.minelittlepony.client.render.layer.LayerGear; +import com.minelittlepony.client.render.layer.LayerHeldPonyItemMagical; +import com.minelittlepony.client.render.layer.LayerPonyArmor; +import com.minelittlepony.client.render.layer.LayerPonyCape; +import com.minelittlepony.client.render.layer.LayerPonyCustomHead; +import com.minelittlepony.client.render.layer.LayerPonyElytra; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPony; import net.minecraft.block.BlockBed; import net.minecraft.client.Minecraft; diff --git a/src/client/java/com/minelittlepony/render/player/RenderSeaponyPlayer.java b/src/client/java/com/minelittlepony/client/render/entities/player/RenderSeaponyPlayer.java similarity index 90% rename from src/client/java/com/minelittlepony/render/player/RenderSeaponyPlayer.java rename to src/client/java/com/minelittlepony/client/render/entities/player/RenderSeaponyPlayer.java index 5f848091..9caa7fc6 100644 --- a/src/client/java/com/minelittlepony/render/player/RenderSeaponyPlayer.java +++ b/src/client/java/com/minelittlepony/client/render/entities/player/RenderSeaponyPlayer.java @@ -1,7 +1,7 @@ -package com.minelittlepony.render.player; +package com.minelittlepony.client.render.entities.player; -import com.minelittlepony.model.ModelWrapper; -import com.minelittlepony.pony.data.IPony; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.common.pony.IPony; import com.minelittlepony.util.math.MathUtil; import net.minecraft.client.entity.AbstractClientPlayer; diff --git a/src/client/java/com/minelittlepony/client/render/entities/player/package-info.java b/src/client/java/com/minelittlepony/client/render/entities/player/package-info.java new file mode 100644 index 00000000..c5350cee --- /dev/null +++ b/src/client/java/com/minelittlepony/client/render/entities/player/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.render.entities.player; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/layer/AbstractPonyLayer.java b/src/client/java/com/minelittlepony/client/render/layer/AbstractPonyLayer.java similarity index 72% rename from src/client/java/com/minelittlepony/render/layer/AbstractPonyLayer.java rename to src/client/java/com/minelittlepony/client/render/layer/AbstractPonyLayer.java index 0fecf8d6..b16964ba 100644 --- a/src/client/java/com/minelittlepony/render/layer/AbstractPonyLayer.java +++ b/src/client/java/com/minelittlepony/client/render/layer/AbstractPonyLayer.java @@ -1,15 +1,15 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; -import com.minelittlepony.ducks.IRenderPony; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.capabilities.IModel; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.common.model.IModel; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLivingBase; import net.minecraft.client.renderer.entity.layers.LayerRenderer; import net.minecraft.entity.EntityLivingBase; -public abstract class AbstractPonyLayer implements LayerRenderer { +public abstract class AbstractPonyLayer implements LayerRenderer { private final RenderLivingBase renderer; @@ -17,13 +17,6 @@ public abstract class AbstractPonyLayer implements L this.renderer = renderer; } - @SuppressWarnings("unchecked") - @Override - public final void doRenderLayer(EntityLivingBase entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { - // render the pony layer - doPonyRender((T)entity, move, swing, partialTicks, ticks, headYaw, headPitch, scale); - } - /** * Renders this layer. * @@ -36,7 +29,8 @@ public abstract class AbstractPonyLayer implements L * @param headPitch Vertical head motion in radians. * @param scale Scaling factor used to render this model. Determined by the return value of {@link RenderLivingBase.prepareScale}. Usually {@code 0.0625F}. */ - protected abstract void doPonyRender(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale); + @Override + public abstract void doRenderLayer(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale); protected RenderLivingBase getRenderer() { return renderer; diff --git a/src/client/java/com/minelittlepony/render/layer/LayerDJPon3Head.java b/src/client/java/com/minelittlepony/client/render/layer/LayerDJPon3Head.java similarity index 76% rename from src/client/java/com/minelittlepony/render/layer/LayerDJPon3Head.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerDJPon3Head.java index adc19269..894c820a 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerDJPon3Head.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerDJPon3Head.java @@ -1,11 +1,11 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderLivingBase; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.components.ModelDeadMau5Ears; +import com.minelittlepony.client.model.components.ModelDeadMau5Ears; +import com.minelittlepony.common.model.BodyPart; public class LayerDJPon3Head extends AbstractPonyLayer { @@ -16,7 +16,7 @@ public class LayerDJPon3Head extends AbstractPonyLayer { } @Override - protected void doPonyRender(AbstractClientPlayer entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { + public void doRenderLayer(AbstractClientPlayer entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { if ("deadmau5".equals(entity.getName())) { getRenderer().bindTexture(entity.getLocationSkin()); diff --git a/src/client/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java b/src/client/java/com/minelittlepony/client/render/layer/LayerEntityOnPonyShoulder.java similarity index 91% rename from src/client/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerEntityOnPonyShoulder.java index bf3bffda..13491767 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerEntityOnPonyShoulder.java @@ -1,6 +1,4 @@ -package com.minelittlepony.render.layer; - -import com.minelittlepony.model.BodyPart; +package com.minelittlepony.client.render.layer; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.renderer.GlStateManager; @@ -12,6 +10,8 @@ import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; +import com.minelittlepony.common.model.BodyPart; + import javax.annotation.Nullable; public class LayerEntityOnPonyShoulder extends AbstractPonyLayer { @@ -27,7 +27,7 @@ public class LayerEntityOnPonyShoulder extends AbstractPonyLayer extends AbstractPonyLayer { } @Override - protected void doPonyRender(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { + public void doRenderLayer(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { getRenderer().bindTexture(eyeTexture); enableBlend(); diff --git a/src/client/java/com/minelittlepony/render/layer/LayerGear.java b/src/client/java/com/minelittlepony/client/render/layer/LayerGear.java similarity index 72% rename from src/client/java/com/minelittlepony/render/layer/LayerGear.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerGear.java index b7a22690..c85276f0 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerGear.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerGear.java @@ -1,4 +1,4 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderLivingBase; @@ -8,17 +8,17 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.google.common.collect.Lists; -import com.minelittlepony.ducks.IRenderPony; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.model.gear.ChristmasHat; -import com.minelittlepony.model.gear.IGear; -import com.minelittlepony.model.gear.IStackable; -import com.minelittlepony.model.gear.Muffin; -import com.minelittlepony.model.gear.SaddleBags; -import com.minelittlepony.model.gear.Stetson; -import com.minelittlepony.model.gear.WitchHat; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.model.gear.ChristmasHat; +import com.minelittlepony.client.model.gear.IGear; +import com.minelittlepony.client.model.gear.IStackable; +import com.minelittlepony.client.model.gear.Muffin; +import com.minelittlepony.client.model.gear.SaddleBags; +import com.minelittlepony.client.model.gear.Stetson; +import com.minelittlepony.client.model.gear.WitchHat; +import com.minelittlepony.common.model.BodyPart; import java.util.HashMap; import java.util.List; @@ -39,7 +39,7 @@ public class LayerGear extends AbstractPonyLayer } @Override - protected void doPonyRender(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { + public void doRenderLayer(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { if (entity.isInvisible()) { return; @@ -73,7 +73,7 @@ public class LayerGear extends AbstractPonyLayer } } - private void renderGear(IModel model, T entity, IGear gear, float move, float swing, float scale, float ticks) { + private void renderGear(IClientModel model, T entity, IGear gear, float move, float swing, float scale, float ticks) { GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); ResourceLocation texture = gear.getTexture(entity); diff --git a/src/client/java/com/minelittlepony/render/layer/LayerHeldItemIllager.java b/src/client/java/com/minelittlepony/client/render/layer/LayerHeldItemIllager.java similarity index 67% rename from src/client/java/com/minelittlepony/render/layer/LayerHeldItemIllager.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerHeldItemIllager.java index c301e574..9207fd7a 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerHeldItemIllager.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerHeldItemIllager.java @@ -1,12 +1,12 @@ -package com.minelittlepony.render.layer; - -import com.minelittlepony.model.ponies.ModelIllagerPony; +package com.minelittlepony.client.render.layer; import net.minecraft.client.renderer.entity.RenderLivingBase; import net.minecraft.entity.monster.AbstractIllager; import net.minecraft.entity.monster.AbstractIllager.IllagerArmPose; import net.minecraft.util.EnumHandSide; +import com.minelittlepony.client.model.entities.ModelIllagerPony; + public class LayerHeldItemIllager extends LayerHeldPonyItem { public LayerHeldItemIllager(RenderLivingBase livingPony) { @@ -14,9 +14,9 @@ public class LayerHeldItemIllager extends LayerHeldPo } @Override - public void doPonyRender(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { + public void doRenderLayer(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { if (shouldRender(entity)) { - super.doPonyRender(entity, move, swing, partialTicks, ticks, headYaw, headPitch, scale); + super.doRenderLayer(entity, move, swing, partialTicks, ticks, headYaw, headPitch, scale); } } diff --git a/src/client/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java b/src/client/java/com/minelittlepony/client/render/layer/LayerHeldPonyItem.java similarity index 89% rename from src/client/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerHeldPonyItem.java index f63c9b1d..4343ee53 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerHeldPonyItem.java @@ -1,7 +1,7 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.common.model.BodyPart; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; @@ -32,13 +32,13 @@ public class LayerHeldPonyItem extends AbstractPonyL } @Override - public void doPonyRender(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { + public void doRenderLayer(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { ItemStack left = getLeftItem(entity); ItemStack right = getRightItem(entity); if (!left.isEmpty() || !right.isEmpty()) { - IModel model = getMainModel(); + IClientModel model = getMainModel(); pushMatrix(); diff --git a/src/client/java/com/minelittlepony/render/layer/LayerHeldPonyItemMagical.java b/src/client/java/com/minelittlepony/client/render/layer/LayerHeldPonyItemMagical.java similarity index 71% rename from src/client/java/com/minelittlepony/render/layer/LayerHeldPonyItemMagical.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerHeldPonyItemMagical.java index 78fc5537..3c8e4856 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerHeldPonyItemMagical.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerHeldPonyItemMagical.java @@ -1,7 +1,9 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; + +import com.minelittlepony.client.PonyRenderManager; +import com.minelittlepony.client.util.render.PonyRenderer; +import com.minelittlepony.common.model.IUnicorn; -import com.minelittlepony.PonyRenderManager; -import com.minelittlepony.model.capabilities.IModelUnicorn; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; import net.minecraft.client.renderer.entity.RenderLivingBase; @@ -16,7 +18,7 @@ public class LayerHeldPonyItemMagical extends LayerH } protected boolean isUnicorn() { - return getMainModel() instanceof IModelUnicorn && this.getPonyModel().canCast(); + return getMainModel() instanceof IUnicorn && this.>getPonyModel().canCast(); } @Override @@ -31,14 +33,14 @@ public class LayerHeldPonyItemMagical extends LayerH @Override protected void postItemRender(T entity, ItemStack drop, TransformType transform, EnumHandSide hand) { if (isUnicorn()) { - PonyRenderManager.getInstance().getMagicRenderer().renderItemGlow(entity, drop, transform, hand, this.getPonyModel().getMagicColor()); + PonyRenderManager.getInstance().getMagicRenderer().renderItemGlow(entity, drop, transform, hand, this.>getPonyModel().getMagicColor()); } } @Override protected void renderArm(EnumHandSide side) { if (isUnicorn()) { - this.getPonyModel().getUnicornArmForSide(side).postRender(0.0625F); + this.>getPonyModel().getUnicornArmForSide(side).postRender(0.0625F); } else { super.renderArm(side); } diff --git a/src/client/java/com/minelittlepony/render/layer/LayerOverlayBase.java b/src/client/java/com/minelittlepony/client/render/layer/LayerOverlayBase.java similarity index 96% rename from src/client/java/com/minelittlepony/render/layer/LayerOverlayBase.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerOverlayBase.java index 779f8f0d..43748def 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerOverlayBase.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerOverlayBase.java @@ -1,4 +1,4 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLivingBase; diff --git a/src/client/java/com/minelittlepony/render/layer/LayerPonyArmor.java b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyArmor.java similarity index 76% rename from src/client/java/com/minelittlepony/render/layer/LayerPonyArmor.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerPonyArmor.java index c60395eb..e1d722db 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerPonyArmor.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyArmor.java @@ -1,13 +1,13 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; -import com.minelittlepony.ForgeProxy; -import com.minelittlepony.model.ModelWrapper; -import com.minelittlepony.model.armour.IEquestrianArmour; -import com.minelittlepony.model.armour.IArmourTextureResolver; -import com.minelittlepony.model.armour.ArmourLayer; -import com.minelittlepony.model.armour.DefaultPonyArmorTextureResolver; -import com.minelittlepony.model.capabilities.IModelArmour; -import com.minelittlepony.util.render.Color; +import com.minelittlepony.client.ForgeProxy; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.armour.DefaultPonyArmorTextureResolver; +import com.minelittlepony.client.util.render.Color; +import com.minelittlepony.common.model.armour.ArmourLayer; +import com.minelittlepony.common.model.armour.IArmour; +import com.minelittlepony.common.model.armour.IArmourTextureResolver; +import com.minelittlepony.common.model.armour.IEquestrianArmour; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; @@ -33,7 +33,7 @@ public class LayerPonyArmor extends AbstractPonyLaye } @Override - public void doPonyRender(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { + public void doRenderLayer(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { pony = getPonyRenderer().getModelWrapper(); for (EntityEquipmentSlot i : EntityEquipmentSlot.values()) { @@ -44,7 +44,7 @@ public class LayerPonyArmor extends AbstractPonyLaye } } - private void renderArmor(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale, EntityEquipmentSlot armorSlot, ArmourLayer layer) { + private void renderArmor(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale, EntityEquipmentSlot armorSlot, ArmourLayer layer) { ItemStack itemstack = entity.getItemStackFromSlot(armorSlot); if (!itemstack.isEmpty() && itemstack.getItem() instanceof ItemArmor) { @@ -85,10 +85,10 @@ public class LayerPonyArmor extends AbstractPonyLaye } @SuppressWarnings("unchecked") - private static V getArmorModel(EntityLivingBase entity, ItemStack itemstack, EntityEquipmentSlot slot, ArmourLayer layer, V def) { + private static V getArmorModel(EntityLivingBase entity, ItemStack itemstack, EntityEquipmentSlot slot, ArmourLayer layer, V def) { ModelBase model = ForgeProxy.getArmorModel(entity, itemstack, slot, def); - if (model instanceof IModelArmour) { + if (model instanceof IArmour) { return (V)model; } diff --git a/src/client/java/com/minelittlepony/render/layer/LayerPonyCape.java b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyCape.java similarity index 88% rename from src/client/java/com/minelittlepony/render/layer/LayerPonyCape.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerPonyCape.java index 29505034..bc985cb6 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerPonyCape.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyCape.java @@ -1,7 +1,7 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.BodyPart; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.common.model.BodyPart; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.renderer.entity.RenderLivingBase; @@ -12,8 +12,8 @@ import net.minecraft.util.math.MathHelper; import javax.annotation.Nonnull; +import static com.minelittlepony.common.model.PonyModelConstants.PI; import static net.minecraft.client.renderer.GlStateManager.*; -import static com.minelittlepony.model.PonyModelConstants.PI; public class LayerPonyCape extends AbstractPonyLayer { @@ -22,7 +22,7 @@ public class LayerPonyCape extends AbstractPonyLayer { } @Override - public void doPonyRender(@Nonnull AbstractClientPlayer player, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { + public void doRenderLayer(@Nonnull AbstractClientPlayer player, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { AbstractPonyModel model = getPlayerModel(); if (player.hasPlayerInfo() && !player.isInvisible() diff --git a/src/client/java/com/minelittlepony/render/layer/LayerPonyCustomHead.java b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyCustomHead.java similarity index 90% rename from src/client/java/com/minelittlepony/render/layer/LayerPonyCustomHead.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerPonyCustomHead.java index 63540118..c21543e2 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerPonyCustomHead.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyCustomHead.java @@ -1,4 +1,4 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; import static net.minecraft.client.renderer.GlStateManager.color; import static net.minecraft.client.renderer.GlStateManager.popMatrix; @@ -7,12 +7,12 @@ import static net.minecraft.client.renderer.GlStateManager.rotate; import static net.minecraft.client.renderer.GlStateManager.scale; import static net.minecraft.client.renderer.GlStateManager.translate; -import com.minelittlepony.ducks.IRenderPony; -import com.minelittlepony.model.AbstractPonyModel; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.ModelWrapper; -import com.minelittlepony.model.capabilities.IModel; -import com.minelittlepony.render.skull.PonySkullRenderer; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.model.AbstractPonyModel; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.render.tileentities.skull.PonySkullRenderer; +import com.minelittlepony.common.model.BodyPart; import com.mojang.authlib.GameProfile; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; @@ -43,7 +43,7 @@ public class LayerPonyCustomHead implements LayerRen public void doRenderLayer(T entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) { ItemStack itemstack = entity.getItemStackFromSlot(EntityEquipmentSlot.HEAD); if (!itemstack.isEmpty()) { - IModel model = getModel().getBody(); + IClientModel model = getModel().getBody(); Item item = itemstack.getItem(); pushMatrix(); diff --git a/src/client/java/com/minelittlepony/render/layer/LayerPonyElytra.java b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyElytra.java similarity index 90% rename from src/client/java/com/minelittlepony/render/layer/LayerPonyElytra.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerPonyElytra.java index a1d73b49..520537ad 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerPonyElytra.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyElytra.java @@ -1,7 +1,7 @@ -package com.minelittlepony.render.layer; +package com.minelittlepony.client.render.layer; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.components.PonyElytra; +import com.minelittlepony.client.model.components.PonyElytra; +import com.minelittlepony.common.model.BodyPart; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.model.ModelBase; @@ -28,7 +28,7 @@ public class LayerPonyElytra extends AbstractPonyLay } @Override - public void doPonyRender(@Nonnull T entity, float move, float swing, float partialTicks, float ticks, float yaw, float head, float scale) { + public void doRenderLayer(@Nonnull T entity, float move, float swing, float partialTicks, float ticks, float yaw, float head, float scale) { ItemStack itemstack = entity.getItemStackFromSlot(EntityEquipmentSlot.CHEST); if (itemstack.getItem() == Items.ELYTRA) { diff --git a/src/client/java/com/minelittlepony/render/layer/LayerPonyStrayOverlay.java b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyStrayOverlay.java similarity index 88% rename from src/client/java/com/minelittlepony/render/layer/LayerPonyStrayOverlay.java rename to src/client/java/com/minelittlepony/client/render/layer/LayerPonyStrayOverlay.java index b58d5213..a06da7b6 100644 --- a/src/client/java/com/minelittlepony/render/layer/LayerPonyStrayOverlay.java +++ b/src/client/java/com/minelittlepony/client/render/layer/LayerPonyStrayOverlay.java @@ -1,12 +1,12 @@ -package com.minelittlepony.render.layer; - -import com.minelittlepony.model.ponies.ModelSkeletonPony; +package com.minelittlepony.client.render.layer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLivingBase; import net.minecraft.entity.monster.EntityStray; import net.minecraft.util.ResourceLocation; +import com.minelittlepony.client.model.entities.ModelSkeletonPony; + public class LayerPonyStrayOverlay extends LayerOverlayBase { public static final ResourceLocation STRAY_SKELETON_OVERLAY = new ResourceLocation("minelittlepony", "textures/entity/skeleton/stray_pony_overlay.png"); diff --git a/src/client/java/com/minelittlepony/client/render/layer/package-info.java b/src/client/java/com/minelittlepony/client/render/layer/package-info.java new file mode 100644 index 00000000..ed667bf7 --- /dev/null +++ b/src/client/java/com/minelittlepony/client/render/layer/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.render.layer; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/client/render/package-info.java b/src/client/java/com/minelittlepony/client/render/package-info.java new file mode 100644 index 00000000..19921488 --- /dev/null +++ b/src/client/java/com/minelittlepony/client/render/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.render; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/skull/PlayerSkullRenderer.java b/src/client/java/com/minelittlepony/client/render/tileentities/skull/PlayerSkullRenderer.java similarity index 87% rename from src/client/java/com/minelittlepony/render/skull/PlayerSkullRenderer.java rename to src/client/java/com/minelittlepony/client/render/tileentities/skull/PlayerSkullRenderer.java index 9128791b..1378f3aa 100644 --- a/src/client/java/com/minelittlepony/render/skull/PlayerSkullRenderer.java +++ b/src/client/java/com/minelittlepony/client/render/tileentities/skull/PlayerSkullRenderer.java @@ -1,10 +1,10 @@ -package com.minelittlepony.render.skull; +package com.minelittlepony.client.render.tileentities.skull; -import com.minelittlepony.PonyConfig; -import com.minelittlepony.model.components.ModelDeadMau5Ears; -import com.minelittlepony.pony.data.Pony; -import com.minelittlepony.pony.data.PonyLevel; -import com.minelittlepony.render.RenderPony; +import com.minelittlepony.client.model.components.ModelDeadMau5Ears; +import com.minelittlepony.client.pony.Pony; +import com.minelittlepony.client.render.RenderPony; +import com.minelittlepony.common.settings.PonyConfig; +import com.minelittlepony.common.settings.PonyLevel; import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.voxelmodpack.hdskins.HDSkinManager; diff --git a/src/client/java/com/minelittlepony/render/skull/PonySkull.java b/src/client/java/com/minelittlepony/client/render/tileentities/skull/PonySkull.java similarity index 67% rename from src/client/java/com/minelittlepony/render/skull/PonySkull.java rename to src/client/java/com/minelittlepony/client/render/tileentities/skull/PonySkull.java index 468c7f3c..314412aa 100644 --- a/src/client/java/com/minelittlepony/render/skull/PonySkull.java +++ b/src/client/java/com/minelittlepony/client/render/tileentities/skull/PonySkull.java @@ -1,10 +1,10 @@ -package com.minelittlepony.render.skull; +package com.minelittlepony.client.render.tileentities.skull; import net.minecraft.client.Minecraft; -import com.minelittlepony.model.components.ModelPonyHead; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.render.skull.PonySkullRenderer.ISkull; +import com.minelittlepony.client.model.components.ModelPonyHead; +import com.minelittlepony.client.render.tileentities.skull.PonySkullRenderer.ISkull; +import com.minelittlepony.common.pony.IPony; public abstract class PonySkull implements ISkull { diff --git a/src/client/java/com/minelittlepony/render/skull/PonySkullRenderer.java b/src/client/java/com/minelittlepony/client/render/tileentities/skull/PonySkullRenderer.java similarity index 95% rename from src/client/java/com/minelittlepony/render/skull/PonySkullRenderer.java rename to src/client/java/com/minelittlepony/client/render/tileentities/skull/PonySkullRenderer.java index b11ec7b7..4a61d0bb 100644 --- a/src/client/java/com/minelittlepony/render/skull/PonySkullRenderer.java +++ b/src/client/java/com/minelittlepony/client/render/tileentities/skull/PonySkullRenderer.java @@ -1,9 +1,9 @@ -package com.minelittlepony.render.skull; +package com.minelittlepony.client.render.tileentities.skull; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.PonyConfig; -import com.minelittlepony.ducks.IRenderItem; -import com.minelittlepony.pony.data.IPony; +import com.minelittlepony.client.ducks.IRenderItem; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPony; +import com.minelittlepony.common.settings.PonyConfig; import com.mojang.authlib.GameProfile; import com.mumfrey.liteloader.util.ModUtilities; import net.minecraft.client.renderer.GlStateManager; diff --git a/src/client/java/com/minelittlepony/render/skull/SkeletonSkullRenderer.java b/src/client/java/com/minelittlepony/client/render/tileentities/skull/SkeletonSkullRenderer.java similarity index 69% rename from src/client/java/com/minelittlepony/render/skull/SkeletonSkullRenderer.java rename to src/client/java/com/minelittlepony/client/render/tileentities/skull/SkeletonSkullRenderer.java index 497a1825..39e493c0 100644 --- a/src/client/java/com/minelittlepony/render/skull/SkeletonSkullRenderer.java +++ b/src/client/java/com/minelittlepony/client/render/tileentities/skull/SkeletonSkullRenderer.java @@ -1,7 +1,7 @@ -package com.minelittlepony.render.skull; +package com.minelittlepony.client.render.tileentities.skull; -import com.minelittlepony.PonyConfig; -import com.minelittlepony.render.ponies.RenderPonySkeleton; +import com.minelittlepony.client.render.entities.RenderPonySkeleton; +import com.minelittlepony.common.settings.PonyConfig; import com.mojang.authlib.GameProfile; import net.minecraft.util.ResourceLocation; diff --git a/src/client/java/com/minelittlepony/render/skull/WitherSkullRenderer.java b/src/client/java/com/minelittlepony/client/render/tileentities/skull/WitherSkullRenderer.java similarity index 69% rename from src/client/java/com/minelittlepony/render/skull/WitherSkullRenderer.java rename to src/client/java/com/minelittlepony/client/render/tileentities/skull/WitherSkullRenderer.java index a13b5159..6fc2ab14 100644 --- a/src/client/java/com/minelittlepony/render/skull/WitherSkullRenderer.java +++ b/src/client/java/com/minelittlepony/client/render/tileentities/skull/WitherSkullRenderer.java @@ -1,7 +1,7 @@ -package com.minelittlepony.render.skull; +package com.minelittlepony.client.render.tileentities.skull; -import com.minelittlepony.PonyConfig; -import com.minelittlepony.render.ponies.RenderPonySkeleton; +import com.minelittlepony.client.render.entities.RenderPonySkeleton; +import com.minelittlepony.common.settings.PonyConfig; import com.mojang.authlib.GameProfile; import net.minecraft.util.ResourceLocation; diff --git a/src/client/java/com/minelittlepony/render/skull/ZombieSkullRenderer.java b/src/client/java/com/minelittlepony/client/render/tileentities/skull/ZombieSkullRenderer.java similarity index 69% rename from src/client/java/com/minelittlepony/render/skull/ZombieSkullRenderer.java rename to src/client/java/com/minelittlepony/client/render/tileentities/skull/ZombieSkullRenderer.java index 1cd00aeb..25c14599 100644 --- a/src/client/java/com/minelittlepony/render/skull/ZombieSkullRenderer.java +++ b/src/client/java/com/minelittlepony/client/render/tileentities/skull/ZombieSkullRenderer.java @@ -1,7 +1,7 @@ -package com.minelittlepony.render.skull; +package com.minelittlepony.client.render.tileentities.skull; -import com.minelittlepony.PonyConfig; -import com.minelittlepony.render.ponies.RenderPonyZombie; +import com.minelittlepony.client.render.entities.RenderPonyZombie; +import com.minelittlepony.common.settings.PonyConfig; import com.mojang.authlib.GameProfile; import net.minecraft.util.ResourceLocation; diff --git a/src/client/java/com/minelittlepony/client/render/tileentities/skull/package-info.java b/src/client/java/com/minelittlepony/client/render/tileentities/skull/package-info.java new file mode 100644 index 00000000..52827962 --- /dev/null +++ b/src/client/java/com/minelittlepony/client/render/tileentities/skull/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.render.tileentities.skull; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/transform/PonyPosture.java b/src/client/java/com/minelittlepony/client/transform/PonyPosture.java similarity index 68% rename from src/client/java/com/minelittlepony/transform/PonyPosture.java rename to src/client/java/com/minelittlepony/client/transform/PonyPosture.java index 6b4ab7b2..09fcae72 100644 --- a/src/client/java/com/minelittlepony/transform/PonyPosture.java +++ b/src/client/java/com/minelittlepony/client/transform/PonyPosture.java @@ -1,9 +1,9 @@ -package com.minelittlepony.transform; - -import com.minelittlepony.model.capabilities.IModel; +package com.minelittlepony.client.transform; import net.minecraft.entity.EntityLivingBase; +import com.minelittlepony.client.model.IClientModel; + public interface PonyPosture { PonyPosture ELYTRA = new PostureElytra(); PonyPosture FLIGHT = new PostureFlight(); @@ -14,5 +14,5 @@ public interface PonyPosture { return true; } - void transform(IModel model, T entity, double motionX, double motionY, double motionZ, float yaw, float ticks); + void transform(IClientModel model, T entity, double motionX, double motionY, double motionZ, float yaw, float ticks); } diff --git a/src/client/java/com/minelittlepony/transform/PonyTransformation.java b/src/client/java/com/minelittlepony/client/transform/PonyTransformation.java similarity index 88% rename from src/client/java/com/minelittlepony/transform/PonyTransformation.java rename to src/client/java/com/minelittlepony/client/transform/PonyTransformation.java index beab8b1e..5eadaa63 100644 --- a/src/client/java/com/minelittlepony/transform/PonyTransformation.java +++ b/src/client/java/com/minelittlepony/client/transform/PonyTransformation.java @@ -1,16 +1,20 @@ -package com.minelittlepony.transform; +package com.minelittlepony.client.transform; import static net.minecraft.client.renderer.GlStateManager.scale; import static net.minecraft.client.renderer.GlStateManager.translate; import net.minecraft.util.math.Vec3d; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.capabilities.IModel; +import com.google.common.collect.Maps; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.model.IModel; +import com.minelittlepony.common.pony.meta.Size; + +import java.util.Map; public enum PonyTransformation { - NORMAL(0, 3F, 0.75F) { + NORMAL(Size.NORMAL, 0, 3F, 0.75F) { @Override public void transform(IModel model, BodyPart part) { if (model.isCrouching()) translate(0, -0.2F, 0); @@ -31,7 +35,7 @@ public enum PonyTransformation { } } }, - LANKY(0, 2.6F, 0.75F) { + LANKY(Size.LANKY, 0, 2.6F, 0.75F) { @Override public void transform(IModel model, BodyPart part) { if (model.isCrouching()) translate(0, -0.15F, 0); @@ -65,7 +69,7 @@ public enum PonyTransformation { } } }, - BULKY(0, 2.3F, 0.75F) { + BULKY(Size.BULKY, 0, 2.3F, 0.75F) { @Override public void transform(IModel model, BodyPart part) { if (model.isCrouching()) translate(0, -0.15F, 0); @@ -99,7 +103,7 @@ public enum PonyTransformation { } } }, - FOAL(0, 3.8F, 0.75F) { + FOAL(Size.FOAL, 0, 3.8F, 0.75F) { @Override public void transform(IModel model, BodyPart part) { if (model.isCrouching()) translate(0, -0.3F, 0); @@ -128,7 +132,7 @@ public enum PonyTransformation { } } }, - TALL(0, 2.2F, 0.75F) { + TALL(Size.TALL, 0, 2.2F, 0.75F) { @Override public void transform(IModel model, BodyPart part) { if (model.isCrouching()) translate(0, -0.15F, 0); @@ -161,7 +165,7 @@ public enum PonyTransformation { } } }, - YEARLING(0, 3.8F, 0.75F) { + YEARLING(Size.YEARLING, 0, 3.8F, 0.75F) { @Override public void transform(IModel model, BodyPart part) { if (model.isCrouching()) translate(0, -0.15F, 0); @@ -195,9 +199,20 @@ public enum PonyTransformation { } }; + private static final Map sizeToTransform = Maps.newEnumMap(Size.class); + + static { + for (PonyTransformation i : values()) { + sizeToTransform.put(i.size, i); + } + } + protected Vec3d riderOffset; - PonyTransformation(float rX, float rY, float rZ) { + private final Size size; + + PonyTransformation(Size size, float rX, float rY, float rZ) { + this.size = size; riderOffset = new Vec3d(rX, rY, rZ); } @@ -210,4 +225,11 @@ public enum PonyTransformation { } public abstract void transform(IModel model, BodyPart part); + + + + + public static PonyTransformation forSize(Size size) { + return sizeToTransform.getOrDefault(size, NORMAL); + } } diff --git a/src/client/java/com/minelittlepony/transform/PostureElytra.java b/src/client/java/com/minelittlepony/client/transform/PostureElytra.java similarity index 56% rename from src/client/java/com/minelittlepony/transform/PostureElytra.java rename to src/client/java/com/minelittlepony/client/transform/PostureElytra.java index 68769224..a681ca11 100644 --- a/src/client/java/com/minelittlepony/transform/PostureElytra.java +++ b/src/client/java/com/minelittlepony/client/transform/PostureElytra.java @@ -1,13 +1,13 @@ -package com.minelittlepony.transform; - -import com.minelittlepony.model.capabilities.IModel; +package com.minelittlepony.client.transform; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.EntityLivingBase; +import com.minelittlepony.client.model.IClientModel; + public class PostureElytra implements PonyPosture { @Override - public void transform(IModel model, EntityLivingBase entity, double motionX, double motionY, double motionZ, float yaw, float ticks) { + public void transform(IClientModel model, EntityLivingBase entity, double motionX, double motionY, double motionZ, float yaw, float ticks) { GlStateManager.rotate(90, 1, 0, 0); GlStateManager.translate(0, entity.isSneaking() ? 0.2F : -1, 0); } diff --git a/src/client/java/com/minelittlepony/client/transform/PostureFalling.java b/src/client/java/com/minelittlepony/client/transform/PostureFalling.java new file mode 100644 index 00000000..1c9b293f --- /dev/null +++ b/src/client/java/com/minelittlepony/client/transform/PostureFalling.java @@ -0,0 +1,12 @@ +package com.minelittlepony.client.transform; + +import net.minecraft.entity.EntityLivingBase; + +import com.minelittlepony.client.model.IClientModel; + +public class PostureFalling implements PonyPosture { + @Override + public void transform(IClientModel model, EntityLivingBase entity, double motionX, double motionY, double motionZ, float yaw, float ticks) { + model.setPitch(0); + } +} diff --git a/src/client/java/com/minelittlepony/transform/PostureFlight.java b/src/client/java/com/minelittlepony/client/transform/PostureFlight.java similarity index 72% rename from src/client/java/com/minelittlepony/transform/PostureFlight.java rename to src/client/java/com/minelittlepony/client/transform/PostureFlight.java index a4d7b500..15109883 100644 --- a/src/client/java/com/minelittlepony/transform/PostureFlight.java +++ b/src/client/java/com/minelittlepony/client/transform/PostureFlight.java @@ -1,6 +1,7 @@ -package com.minelittlepony.transform; +package com.minelittlepony.client.transform; -import com.minelittlepony.model.capabilities.IModel; +import com.minelittlepony.client.model.IClientModel; +import com.minelittlepony.util.transform.MotionCompositor; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.renderer.GlStateManager; @@ -13,7 +14,7 @@ public class PostureFlight extends MotionCompositor implements PonyPosture> extends ModelRenderer { +public abstract class AbstractRenderer> extends ModelRenderer { protected final ModelBase baseModel; @@ -17,12 +17,12 @@ public abstract class AbstractBoxRenderer> exte protected float modelOffsetY; protected float modelOffsetZ; - public AbstractBoxRenderer(ModelBase model) { + public AbstractRenderer(ModelBase model) { super(model); baseModel = model; } - public AbstractBoxRenderer(ModelBase model, int texX, int texY) { + public AbstractRenderer(ModelBase model, int texX, int texY) { super(model, texX, texY); baseModel = model; } diff --git a/src/client/java/com/minelittlepony/util/render/Box.java b/src/client/java/com/minelittlepony/client/util/render/Box.java similarity index 96% rename from src/client/java/com/minelittlepony/util/render/Box.java rename to src/client/java/com/minelittlepony/client/util/render/Box.java index 0c4ad8f6..eb9dd164 100644 --- a/src/client/java/com/minelittlepony/util/render/Box.java +++ b/src/client/java/com/minelittlepony/client/util/render/Box.java @@ -1,4 +1,4 @@ -package com.minelittlepony.util.render; +package com.minelittlepony.client.util.render; import net.minecraft.client.model.ModelBox; import net.minecraft.client.model.ModelRenderer; diff --git a/src/client/java/com/minelittlepony/util/render/Color.java b/src/client/java/com/minelittlepony/client/util/render/Color.java similarity index 96% rename from src/client/java/com/minelittlepony/util/render/Color.java rename to src/client/java/com/minelittlepony/client/util/render/Color.java index 907c6e7e..9f162c95 100644 --- a/src/client/java/com/minelittlepony/util/render/Color.java +++ b/src/client/java/com/minelittlepony/client/util/render/Color.java @@ -1,4 +1,4 @@ -package com.minelittlepony.util.render; +package com.minelittlepony.client.util.render; import net.minecraft.client.renderer.GlStateManager; diff --git a/src/client/java/com/minelittlepony/render/model/GlowRenderer.java b/src/client/java/com/minelittlepony/client/util/render/GlowRenderer.java similarity index 75% rename from src/client/java/com/minelittlepony/render/model/GlowRenderer.java rename to src/client/java/com/minelittlepony/client/util/render/GlowRenderer.java index 0e9becb5..903b5104 100644 --- a/src/client/java/com/minelittlepony/render/model/GlowRenderer.java +++ b/src/client/java/com/minelittlepony/client/util/render/GlowRenderer.java @@ -1,14 +1,11 @@ -package com.minelittlepony.render.model; +package com.minelittlepony.client.util.render; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBase; import org.lwjgl.opengl.GL11; -import com.minelittlepony.util.render.AbstractBoxRenderer; -import com.minelittlepony.util.render.Color; - -public class GlowRenderer extends AbstractBoxRenderer { +public class GlowRenderer extends AbstractRenderer { int tint; float alpha = 1; @@ -35,7 +32,7 @@ public class GlowRenderer extends AbstractBoxRenderer { @Override public void createBox(float offX, float offY, float offZ, int width, int height, int depth, float scaleFactor, boolean mirrored) { - cubeList.add(new ModelGlow(this, textureOffsetX, textureOffsetY, offX, offY, offZ, width, height, depth, scaleFactor, alpha)); + cubeList.add(new HornGlow(this, textureOffsetX, textureOffsetY, offX, offY, offZ, width, height, depth, scaleFactor, alpha)); } @Override diff --git a/src/client/java/com/minelittlepony/render/model/ModelGlow.java b/src/client/java/com/minelittlepony/client/util/render/HornGlow.java similarity index 84% rename from src/client/java/com/minelittlepony/render/model/ModelGlow.java rename to src/client/java/com/minelittlepony/client/util/render/HornGlow.java index 54289295..3ab95085 100644 --- a/src/client/java/com/minelittlepony/render/model/ModelGlow.java +++ b/src/client/java/com/minelittlepony/client/util/render/HornGlow.java @@ -1,21 +1,17 @@ -package com.minelittlepony.render.model; +package com.minelittlepony.client.util.render; import net.minecraft.client.renderer.BufferBuilder; -import com.minelittlepony.util.render.Box; -import com.minelittlepony.util.render.Quad; -import com.minelittlepony.util.render.Vertex; - /** * Like a normal box, but with the top narrowed a bit. */ -public class ModelGlow extends Box { +public class HornGlow extends Box { private final float alpha; private Quad[] quadList; - public ModelGlow(GlowRenderer renderer, int texX, int texY, float xMin, float yMin, float zMin, int w, int h, int d, float scale, float alpha) { + public HornGlow(GlowRenderer renderer, int texX, int texY, float xMin, float yMin, float zMin, int w, int h, int d, float scale, float alpha) { super(renderer, texX, texY, xMin, yMin, zMin, w, h, d, scale); this.alpha = alpha; diff --git a/src/client/java/com/minelittlepony/render/model/PonyRenderer.java b/src/client/java/com/minelittlepony/client/util/render/PonyRenderer.java similarity index 67% rename from src/client/java/com/minelittlepony/render/model/PonyRenderer.java rename to src/client/java/com/minelittlepony/client/util/render/PonyRenderer.java index d656eb10..338e3c1f 100644 --- a/src/client/java/com/minelittlepony/render/model/PonyRenderer.java +++ b/src/client/java/com/minelittlepony/client/util/render/PonyRenderer.java @@ -1,10 +1,8 @@ -package com.minelittlepony.render.model; +package com.minelittlepony.client.util.render; import net.minecraft.client.model.ModelBase; -import com.minelittlepony.util.render.AbstractBoxRenderer; - -public class PonyRenderer extends AbstractBoxRenderer { +public class PonyRenderer extends AbstractRenderer { public PonyRenderer(ModelBase model) { super(model); diff --git a/src/client/java/com/minelittlepony/util/render/Quad.java b/src/client/java/com/minelittlepony/client/util/render/Quad.java similarity index 95% rename from src/client/java/com/minelittlepony/util/render/Quad.java rename to src/client/java/com/minelittlepony/client/util/render/Quad.java index 217ac3ae..ef3b03ad 100644 --- a/src/client/java/com/minelittlepony/util/render/Quad.java +++ b/src/client/java/com/minelittlepony/client/util/render/Quad.java @@ -1,4 +1,4 @@ -package com.minelittlepony.util.render; +package com.minelittlepony.client.util.render; import net.minecraft.client.model.TexturedQuad; diff --git a/src/client/java/com/minelittlepony/util/render/Vertex.java b/src/client/java/com/minelittlepony/client/util/render/Vertex.java similarity index 92% rename from src/client/java/com/minelittlepony/util/render/Vertex.java rename to src/client/java/com/minelittlepony/client/util/render/Vertex.java index dbfb36e3..f1b6110f 100644 --- a/src/client/java/com/minelittlepony/util/render/Vertex.java +++ b/src/client/java/com/minelittlepony/client/util/render/Vertex.java @@ -1,4 +1,4 @@ -package com.minelittlepony.util.render; +package com.minelittlepony.client.util.render; import net.minecraft.client.model.PositionTextureVertex; diff --git a/src/client/java/com/minelittlepony/client/util/render/package-info.java b/src/client/java/com/minelittlepony/client/util/render/package-info.java new file mode 100644 index 00000000..906e6df7 --- /dev/null +++ b/src/client/java/com/minelittlepony/client/util/render/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.util.render; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/model/ModelPlane.java b/src/client/java/com/minelittlepony/client/util/render/plane/ModelPlane.java similarity index 92% rename from src/client/java/com/minelittlepony/render/model/ModelPlane.java rename to src/client/java/com/minelittlepony/client/util/render/plane/ModelPlane.java index 444325a2..2924b26b 100644 --- a/src/client/java/com/minelittlepony/render/model/ModelPlane.java +++ b/src/client/java/com/minelittlepony/client/util/render/plane/ModelPlane.java @@ -1,10 +1,10 @@ -package com.minelittlepony.render.model; +package com.minelittlepony.client.util.render.plane; import net.minecraft.client.renderer.BufferBuilder; -import com.minelittlepony.util.render.Box; -import com.minelittlepony.util.render.Quad; -import com.minelittlepony.util.render.Vertex; +import com.minelittlepony.client.util.render.Box; +import com.minelittlepony.client.util.render.Quad; +import com.minelittlepony.client.util.render.Vertex; import javax.annotation.Nonnull; diff --git a/src/client/java/com/minelittlepony/render/model/Plane.java b/src/client/java/com/minelittlepony/client/util/render/plane/Plane.java similarity index 57% rename from src/client/java/com/minelittlepony/render/model/Plane.java rename to src/client/java/com/minelittlepony/client/util/render/plane/Plane.java index 9e509117..228182f3 100644 --- a/src/client/java/com/minelittlepony/render/model/Plane.java +++ b/src/client/java/com/minelittlepony/client/util/render/plane/Plane.java @@ -1,4 +1,4 @@ -package com.minelittlepony.render.model; +package com.minelittlepony.client.util.render.plane; enum Plane { NORTH, diff --git a/src/client/java/com/minelittlepony/render/model/PlaneRenderer.java b/src/client/java/com/minelittlepony/client/util/render/plane/PlaneRenderer.java similarity index 92% rename from src/client/java/com/minelittlepony/render/model/PlaneRenderer.java rename to src/client/java/com/minelittlepony/client/util/render/plane/PlaneRenderer.java index e738e396..b426993c 100644 --- a/src/client/java/com/minelittlepony/render/model/PlaneRenderer.java +++ b/src/client/java/com/minelittlepony/client/util/render/plane/PlaneRenderer.java @@ -1,10 +1,10 @@ -package com.minelittlepony.render.model; +package com.minelittlepony.client.util.render.plane; import net.minecraft.client.model.ModelBase; -import com.minelittlepony.util.render.AbstractBoxRenderer; +import com.minelittlepony.client.util.render.AbstractRenderer; -public class PlaneRenderer extends AbstractBoxRenderer { +public class PlaneRenderer extends AbstractRenderer { public boolean mirrory, mirrorz; diff --git a/src/client/java/com/minelittlepony/client/util/render/plane/package-info.java b/src/client/java/com/minelittlepony/client/util/render/plane/package-info.java new file mode 100644 index 00000000..5c5766a7 --- /dev/null +++ b/src/client/java/com/minelittlepony/client/util/render/plane/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.client.util.render.plane; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/hdskins/gui/GuiSkinsMineLP.java b/src/client/java/com/minelittlepony/hdskins/client/gui/GuiSkinsMineLP.java similarity index 93% rename from src/client/java/com/minelittlepony/hdskins/gui/GuiSkinsMineLP.java rename to src/client/java/com/minelittlepony/hdskins/client/gui/GuiSkinsMineLP.java index 40b9e259..040c19ac 100644 --- a/src/client/java/com/minelittlepony/hdskins/gui/GuiSkinsMineLP.java +++ b/src/client/java/com/minelittlepony/hdskins/client/gui/GuiSkinsMineLP.java @@ -1,9 +1,10 @@ -package com.minelittlepony.hdskins.gui; +package com.minelittlepony.hdskins.client.gui; -import com.minelittlepony.MineLittlePony; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPonyManager; import com.minelittlepony.gui.IconicToggle; import com.minelittlepony.gui.Style; -import com.minelittlepony.pony.data.IPonyManager; +import com.minelittlepony.hdskins.entity.EntityPonyModel; import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type; diff --git a/src/client/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java b/src/client/java/com/minelittlepony/hdskins/client/gui/RenderPonyModel.java similarity index 79% rename from src/client/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java rename to src/client/java/com/minelittlepony/hdskins/client/gui/RenderPonyModel.java index e1c9c967..d4418d1b 100644 --- a/src/client/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java +++ b/src/client/java/com/minelittlepony/hdskins/client/gui/RenderPonyModel.java @@ -1,15 +1,16 @@ -package com.minelittlepony.hdskins.gui; +package com.minelittlepony.hdskins.client.gui; -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.ducks.IRenderPony; -import com.minelittlepony.model.ModelWrapper; -import com.minelittlepony.model.player.PlayerModels; -import com.minelittlepony.pony.data.IPony; -import com.minelittlepony.pony.data.Pony; -import com.minelittlepony.pony.data.PonyRace; -import com.minelittlepony.render.layer.LayerGear; -import com.minelittlepony.render.layer.LayerPonyElytra; -import com.minelittlepony.render.RenderPony; +import com.minelittlepony.client.ducks.IRenderPony; +import com.minelittlepony.client.model.ModelWrapper; +import com.minelittlepony.client.model.races.PlayerModels; +import com.minelittlepony.client.pony.Pony; +import com.minelittlepony.client.render.RenderPony; +import com.minelittlepony.client.render.layer.LayerGear; +import com.minelittlepony.client.render.layer.LayerPonyElytra; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.IPony; +import com.minelittlepony.common.pony.meta.Race; +import com.minelittlepony.hdskins.entity.EntityPonyModel; import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type; import com.voxelmodpack.hdskins.gui.RenderPlayerModel; @@ -72,15 +73,15 @@ public class RenderPonyModel extends RenderPlayerModel implemen IPony thePony = MineLittlePony.getInstance().getManager().getPony(loc); - PonyRace race = thePony.getRace(false); + Race race = thePony.getRace(false); if (race.isHuman()) { return super.getEntityModel(playermodel); } - boolean canWet = playermodel.wet && (loc == playermodel.getBlankSkin(Type.SKIN) || race == PonyRace.SEAPONY); + boolean canWet = playermodel.wet && (loc == playermodel.getBlankSkin(Type.SKIN) || race == Race.SEAPONY); - playerModel = canWet ? PlayerModels.SEAPONY.getModel(slim) : thePony.getRace(true).getModel().getModel(slim); + playerModel = canWet ? PlayerModels.SEAPONY.getModel(slim) : PlayerModels.forRace(thePony.getRace(true)).getModel(slim); playerModel.apply(thePony.getMetadata()); renderPony.setPonyModel(playerModel); @@ -91,7 +92,7 @@ public class RenderPonyModel extends RenderPlayerModel implemen } @Override - protected LayerRenderer getElytraLayer() { + protected LayerRenderer getElytraLayer() { return new LayerPonyElytra(this) { private final ModelElytra modelElytra = new ModelElytra(); diff --git a/src/client/java/com/minelittlepony/hdskins/client/gui/package-info.java b/src/client/java/com/minelittlepony/hdskins/client/gui/package-info.java new file mode 100644 index 00000000..3e29ba42 --- /dev/null +++ b/src/client/java/com/minelittlepony/hdskins/client/gui/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.hdskins.client.gui; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/model/PMAPI.java b/src/client/java/com/minelittlepony/model/PMAPI.java deleted file mode 100644 index 6f2f1b1d..00000000 --- a/src/client/java/com/minelittlepony/model/PMAPI.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.minelittlepony.model; - -import com.minelittlepony.model.player.*; -import com.minelittlepony.model.ponies.*; - -/** - * PMAPI - Pony Models API? - * - * TODO: Remove this, move the models to where they're being used. - */ -public interface PMAPI { - - ModelWrapper earthpony = new ModelWrapper(new ModelEarthPony(false)); - ModelWrapper earthponySmall = new ModelWrapper(new ModelEarthPony(true)); - - ModelWrapper pegasus = new ModelWrapper(new ModelPegasus(false)); - ModelWrapper pegasusSmall = new ModelWrapper(new ModelPegasus(true)); - - ModelWrapper bat = new ModelWrapper(new ModelBatpony(false)); - ModelWrapper batSmall = new ModelWrapper(new ModelBatpony(true)); - - ModelWrapper unicorn = new ModelWrapper(new ModelUnicorn(false)); - ModelWrapper unicornSmall = new ModelWrapper(new ModelUnicorn(true)); - - ModelWrapper alicorn = new ModelWrapper(new ModelAlicorn(false)); - ModelWrapper alicornSmall = new ModelWrapper(new ModelAlicorn(true)); - - ModelWrapper zebra = new ModelWrapper(new ModelZebra(false)); - ModelWrapper zebraSmall = new ModelWrapper(new ModelZebra(true)); - - ModelWrapper bug = new ModelWrapper(new ModelChangeling(false)); - ModelWrapper bugSmall = new ModelWrapper(new ModelChangeling(true)); - - ModelWrapper seapony = new ModelWrapper(new ModelSeapony()); - - ModelWrapper zombie = new ModelWrapper(new ModelZombiePony()); - ModelWrapper skeleton = new ModelWrapper(new ModelSkeletonPony()); - ModelWrapper villager = new ModelWrapper(new ModelVillagerPony()); - ModelWrapper zombieVillager = new ModelWrapper(new ModelZombieVillagerPony()); - ModelWrapper illager = new ModelWrapper(new ModelIllagerPony()); - ModelWrapper witch = new ModelWrapper(new ModelWitchPony()); - ModelWrapper enderman = new ModelWrapper(new ModelEnderStallion()); -} diff --git a/src/client/java/com/minelittlepony/model/components/package-info.java b/src/client/java/com/minelittlepony/model/components/package-info.java deleted file mode 100644 index 34123d53..00000000 --- a/src/client/java/com/minelittlepony/model/components/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.model.components; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/model/player/PlayerModels.java b/src/client/java/com/minelittlepony/model/player/PlayerModels.java deleted file mode 100644 index e0516bf2..00000000 --- a/src/client/java/com/minelittlepony/model/player/PlayerModels.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.minelittlepony.model.player; - -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.player.RenderPonyPlayer; -import com.minelittlepony.render.player.RenderSeaponyPlayer; - -import net.minecraft.client.renderer.entity.RenderManager; - -import com.minelittlepony.model.ModelWrapper; -import com.voxelmodpack.hdskins.VanillaModels; - -public enum PlayerModels { - /** - * The default non-pony model. This is typically handled my the vanilla renderer. - */ - DEFAULT(VanillaModels.DEFAULT, VanillaModels.SLIM, () -> PMAPI.earthpony, () -> PMAPI.earthponySmall), - EARTH("earthpony", () -> PMAPI.earthpony, () -> PMAPI.earthponySmall), - PEGASUS("pegasus", () -> PMAPI.pegasus, () -> PMAPI.pegasusSmall), - BATPONY("batpony", () -> PMAPI.bat, () -> PMAPI.batSmall), - UNICORN("unicorn", () -> PMAPI.unicorn, () -> PMAPI.unicornSmall), - ALICORN("alicorn", () -> PMAPI.alicorn, () -> PMAPI.alicornSmall), - CHANGELING("changeling", () -> PMAPI.bug, () -> PMAPI.bugSmall), - ZEBRA("zebra", () -> PMAPI.zebra, () -> PMAPI.zebraSmall), - SEAPONY("seapony", () -> PMAPI.seapony, () -> PMAPI.seapony) { - @Override - public RenderPonyPlayer createRenderer(RenderManager manager, boolean slimArms) { - return new RenderSeaponyPlayer(manager, slimArms, PlayerModels.UNICORN.getModel(slimArms), getModel(slimArms)); - } - }; - - private final ModelResolver normal, slim; - - private final String normalKey, slimKey; - - PlayerModels(String key, ModelResolver normal, ModelResolver slim) { - this(key, VanillaModels.SLIM + key, normal, slim); - } - - PlayerModels(String normalKey, String slimKey, ModelResolver normal, ModelResolver slim) { - this.normalKey = normalKey; - this.slimKey = slimKey; - - this.normal = normal; - this.slim = slim; - } - - public ModelWrapper getModel(boolean slim) { - return slim ? this.slim.resolve() : normal.resolve(); - } - - public String getId(boolean useSlimArms) { - return useSlimArms ? slimKey : normalKey; - } - - public RenderPonyPlayer createRenderer(RenderManager manager, boolean slimArms) { - return new RenderPonyPlayer(manager, slimArms, getModel(slimArms)); - } - - /** - * FIXME: PMAPI fields are null when the game starts. - */ - static interface ModelResolver { - ModelWrapper resolve(); - } -} diff --git a/src/client/java/com/minelittlepony/model/player/package-info.java b/src/client/java/com/minelittlepony/model/player/package-info.java deleted file mode 100644 index fefa925a..00000000 --- a/src/client/java/com/minelittlepony/model/player/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.model.player; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/model/ponies/package-info.java b/src/client/java/com/minelittlepony/model/ponies/package-info.java deleted file mode 100644 index 576187ce..00000000 --- a/src/client/java/com/minelittlepony/model/ponies/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.model.ponies; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/package-info.java b/src/client/java/com/minelittlepony/package-info.java deleted file mode 100644 index a1d3fc42..00000000 --- a/src/client/java/com/minelittlepony/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/pony/data/PonyRace.java b/src/client/java/com/minelittlepony/pony/data/PonyRace.java deleted file mode 100644 index dd1cb966..00000000 --- a/src/client/java/com/minelittlepony/pony/data/PonyRace.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.minelittlepony.pony.data; - -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.model.player.PlayerModels; - -public enum PonyRace implements ITriggerPixelMapped { - - HUMAN(0, PlayerModels.DEFAULT, false, false), - EARTH(0xf9b131, PlayerModels.EARTH, false, false), - PEGASUS(0x88caf0, PlayerModels.PEGASUS, true, false), - UNICORN(0xd19fe4, PlayerModels.UNICORN, false, true), - ALICORN(0xfef9fc, PlayerModels.ALICORN, true, true), - CHANGELING(0x282b29, PlayerModels.CHANGELING, true, true), - ZEBRA(0xd0cccf, PlayerModels.ZEBRA, false, false), - REFORMED_CHANGELING(0xcaed5a, PlayerModels.CHANGELING, true, true), - GRIFFIN(0xae9145, PlayerModels.PEGASUS, true, false), - HIPPOGRIFF(0xd6ddac, PlayerModels.PEGASUS, true, false), - BATPONY(0xeeeeee, PlayerModels.BATPONY, true, false), - SEAPONY(0x3655dd, PlayerModels.SEAPONY, false, true); - - private boolean wings; - private boolean horn; - - private int triggerPixel; - - private PlayerModels model; - - PonyRace(int triggerPixel, PlayerModels model, boolean wings, boolean horn) { - this.triggerPixel = triggerPixel; - - this.wings = wings; - this.horn = horn; - this.model = model; - } - - /** - * Returns true if this pony has a horn (and by extension can cast magic). - * @return - */ - public boolean hasHorn() { - return horn; - } - - /** - * Returns true if this pony has wings. If it has wings, it can fly, of course. - */ - public boolean hasWings() { - return wings; - } - - /** - * Returns true if this is a human. - */ - public boolean isHuman() { - return this == HUMAN; - } - - /** - * Gets the model type associated with this species. - */ - public PlayerModels getModel() { - return model; - } - - /** - * Gets the actual race determined by the given pony level. - * PonyLevel.HUMANS would force all races to be humans. - * PonyLevel.BOTH is no change. - * PonyLevel.PONIES (should) return a pony if this is a human. Don't be fooled, though. It doesn't. - */ - public PonyRace getEffectiveRace(boolean ignorePony) { - if (MineLittlePony.getInstance().getConfig().getEffectivePonyLevel(ignorePony) == PonyLevel.HUMANS) { - return HUMAN; - } - - return this; - } - - @Override - public int getTriggerPixel() { - return triggerPixel; - } -} diff --git a/src/client/java/com/minelittlepony/pony/data/package-info.java b/src/client/java/com/minelittlepony/pony/data/package-info.java deleted file mode 100644 index 31822866..00000000 --- a/src/client/java/com/minelittlepony/pony/data/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.pony.data; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/layer/package-info.java b/src/client/java/com/minelittlepony/render/layer/package-info.java deleted file mode 100644 index d6daad76..00000000 --- a/src/client/java/com/minelittlepony/render/layer/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.render.layer; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/model/package-info.java b/src/client/java/com/minelittlepony/render/model/package-info.java deleted file mode 100644 index 79bb8ff0..00000000 --- a/src/client/java/com/minelittlepony/render/model/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.render.model; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/package-info.java b/src/client/java/com/minelittlepony/render/package-info.java deleted file mode 100644 index 4e9d38ab..00000000 --- a/src/client/java/com/minelittlepony/render/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.render; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/player/package-info.java b/src/client/java/com/minelittlepony/render/player/package-info.java deleted file mode 100644 index ee1504e8..00000000 --- a/src/client/java/com/minelittlepony/render/player/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.render.player; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/ponies/RenderPonyPigman.java b/src/client/java/com/minelittlepony/render/ponies/RenderPonyPigman.java deleted file mode 100644 index 695ae40e..00000000 --- a/src/client/java/com/minelittlepony/render/ponies/RenderPonyPigman.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.minelittlepony.render.ponies; - -import com.minelittlepony.model.PMAPI; -import com.minelittlepony.render.RenderPonyMob; - -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.util.ResourceLocation; - -public class RenderPonyPigman extends RenderPonyMob { - - private static final ResourceLocation PIGMAN = new ResourceLocation("minelittlepony", "textures/entity/zombie/zombie_pigman_pony.png"); - - public RenderPonyPigman(RenderManager manager) { - super(manager, PMAPI.zombie); - } - - @Override - public ResourceLocation getTexture(EntityPigZombie entity) { - return PIGMAN; - } - -} diff --git a/src/client/java/com/minelittlepony/render/ponies/package-info.java b/src/client/java/com/minelittlepony/render/ponies/package-info.java deleted file mode 100644 index 5ecb94c1..00000000 --- a/src/client/java/com/minelittlepony/render/ponies/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.render.ponies; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/render/skull/package-info.java b/src/client/java/com/minelittlepony/render/skull/package-info.java deleted file mode 100644 index 0c4d7a0a..00000000 --- a/src/client/java/com/minelittlepony/render/skull/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.render.skull; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/client/java/com/minelittlepony/transform/PostureFalling.java b/src/client/java/com/minelittlepony/transform/PostureFalling.java deleted file mode 100644 index 6d7de7f7..00000000 --- a/src/client/java/com/minelittlepony/transform/PostureFalling.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.minelittlepony.transform; - -import com.minelittlepony.model.capabilities.IModel; - -import net.minecraft.entity.EntityLivingBase; - -public class PostureFalling implements PonyPosture { - @Override - public void transform(IModel model, EntityLivingBase entity, double motionX, double motionY, double motionZ, float yaw, float ticks) { - model.setPitch(0); - } -} diff --git a/src/client/java/com/minelittlepony/util/render/package-info.java b/src/client/java/com/minelittlepony/util/render/package-info.java deleted file mode 100644 index 4e9d3c08..00000000 --- a/src/client/java/com/minelittlepony/util/render/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.util.render; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/common/java/com/minelittlepony/MineLittlePony.java b/src/common/java/com/minelittlepony/common/MineLittlePony.java similarity index 83% rename from src/common/java/com/minelittlepony/MineLittlePony.java rename to src/common/java/com/minelittlepony/common/MineLittlePony.java index e337e878..c9d893d6 100644 --- a/src/common/java/com/minelittlepony/MineLittlePony.java +++ b/src/common/java/com/minelittlepony/common/MineLittlePony.java @@ -1,9 +1,10 @@ -package com.minelittlepony; +package com.minelittlepony.common; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import com.minelittlepony.pony.data.IPonyManager; +import com.minelittlepony.common.pony.IPonyManager; +import com.minelittlepony.common.settings.PonyConfig; public abstract class MineLittlePony { @@ -14,7 +15,7 @@ public abstract class MineLittlePony { public static final String MOD_NAME = "Mine Little Pony"; public static final String MOD_VERSION = "@VERSION@"; - MineLittlePony() { + protected MineLittlePony() { instance = this; } diff --git a/src/common/java/com/minelittlepony/MissingRendererException.java b/src/common/java/com/minelittlepony/common/MissingRendererException.java similarity index 88% rename from src/common/java/com/minelittlepony/MissingRendererException.java rename to src/common/java/com/minelittlepony/common/MissingRendererException.java index 4ae09414..8081ca66 100644 --- a/src/common/java/com/minelittlepony/MissingRendererException.java +++ b/src/common/java/com/minelittlepony/common/MissingRendererException.java @@ -1,4 +1,4 @@ -package com.minelittlepony; +package com.minelittlepony.common; public class MissingRendererException extends RuntimeException { private static final long serialVersionUID = -6059469512902628663L; diff --git a/src/common/java/com/minelittlepony/model/BodyPart.java b/src/common/java/com/minelittlepony/common/model/BodyPart.java similarity index 67% rename from src/common/java/com/minelittlepony/model/BodyPart.java rename to src/common/java/com/minelittlepony/common/model/BodyPart.java index 12a7bdfe..a6003f74 100644 --- a/src/common/java/com/minelittlepony/model/BodyPart.java +++ b/src/common/java/com/minelittlepony/common/model/BodyPart.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model; +package com.minelittlepony.common.model; public enum BodyPart { HEAD, diff --git a/src/client/java/com/minelittlepony/model/capabilities/ICapitated.java b/src/common/java/com/minelittlepony/common/model/ICapitated.java similarity index 72% rename from src/client/java/com/minelittlepony/model/capabilities/ICapitated.java rename to src/common/java/com/minelittlepony/common/model/ICapitated.java index 1b586428..272a4dfa 100644 --- a/src/client/java/com/minelittlepony/model/capabilities/ICapitated.java +++ b/src/common/java/com/minelittlepony/common/model/ICapitated.java @@ -1,10 +1,8 @@ -package com.minelittlepony.model.capabilities; - -import net.minecraft.client.model.ModelRenderer; +package com.minelittlepony.common.model; import javax.annotation.Nullable; -public interface ICapitated { +public interface ICapitated { /** * Gets the head of this capitated object. */ diff --git a/src/client/java/com/minelittlepony/model/capabilities/IModel.java b/src/common/java/com/minelittlepony/common/model/IModel.java similarity index 85% rename from src/client/java/com/minelittlepony/model/capabilities/IModel.java rename to src/common/java/com/minelittlepony/common/model/IModel.java index d17cec5e..1bb1e984 100644 --- a/src/client/java/com/minelittlepony/model/capabilities/IModel.java +++ b/src/common/java/com/minelittlepony/common/model/IModel.java @@ -1,12 +1,12 @@ -package com.minelittlepony.model.capabilities; +package com.minelittlepony.common.model; -import com.minelittlepony.model.BodyPart; -import com.minelittlepony.model.armour.IEquestrianArmour; -import com.minelittlepony.pony.data.IPonyData; -import com.minelittlepony.pony.data.PonySize; -import com.minelittlepony.pony.data.PonyWearable; +import com.minelittlepony.common.model.BodyPart; +import com.minelittlepony.common.model.armour.IEquestrianArmour; +import com.minelittlepony.common.pony.IPonyData; +import com.minelittlepony.common.pony.meta.Wearable; +import com.minelittlepony.common.pony.meta.Size; -public interface IModel extends ICapitated { +public interface IModel { /** * Sets up this model's initial values, like a constructor... @@ -27,7 +27,7 @@ public interface IModel extends ICapitated { /** * Gets the active scaling profile used to lay out this model's parts. */ - PonySize getSize(); + Size getSize(); /** * Returns a new pony armour to go with this model. Called on startup by a model wrapper. @@ -110,7 +110,7 @@ public interface IModel extends ICapitated { /** * Tests if this model is wearing the given piece of gear. */ - default boolean isWearing(PonyWearable wearable) { + default boolean isWearing(Wearable wearable) { return getMetadata().isWearing(wearable); } } diff --git a/src/client/java/com/minelittlepony/model/capabilities/IModelPart.java b/src/common/java/com/minelittlepony/common/model/IPart.java similarity index 90% rename from src/client/java/com/minelittlepony/model/capabilities/IModelPart.java rename to src/common/java/com/minelittlepony/common/model/IPart.java index 0bd835f7..a6ea504b 100644 --- a/src/client/java/com/minelittlepony/model/capabilities/IModelPart.java +++ b/src/common/java/com/minelittlepony/common/model/IPart.java @@ -1,8 +1,8 @@ -package com.minelittlepony.model.capabilities; +package com.minelittlepony.common.model; import java.util.UUID; -public interface IModelPart { +public interface IPart { /** * Initialises all of the boxes in this modelpart. * @param yOffset diff --git a/src/client/java/com/minelittlepony/model/capabilities/IModelPegasus.java b/src/common/java/com/minelittlepony/common/model/IPegasus.java similarity index 73% rename from src/client/java/com/minelittlepony/model/capabilities/IModelPegasus.java rename to src/common/java/com/minelittlepony/common/model/IPegasus.java index c73ca487..a0b24015 100644 --- a/src/client/java/com/minelittlepony/model/capabilities/IModelPegasus.java +++ b/src/common/java/com/minelittlepony/common/model/IPegasus.java @@ -1,11 +1,11 @@ -package com.minelittlepony.model.capabilities; - -import static com.minelittlepony.model.PonyModelConstants.WING_ROT_Z_SNEAK; -import static com.minelittlepony.model.PonyModelConstants.ROTATE_270; +package com.minelittlepony.common.model; import net.minecraft.util.math.MathHelper; -public interface IModelPegasus extends IModel { +import static com.minelittlepony.common.model.PonyModelConstants.ROTATE_270; +import static com.minelittlepony.common.model.PonyModelConstants.WING_ROT_Z_SNEAK; + +public interface IPegasus extends IModel { /** * Returns true if the wings are spread. diff --git a/src/client/java/com/minelittlepony/model/capabilities/IModelUnicorn.java b/src/common/java/com/minelittlepony/common/model/IUnicorn.java similarity index 69% rename from src/client/java/com/minelittlepony/model/capabilities/IModelUnicorn.java rename to src/common/java/com/minelittlepony/common/model/IUnicorn.java index 61751bd7..74692b3b 100644 --- a/src/client/java/com/minelittlepony/model/capabilities/IModelUnicorn.java +++ b/src/common/java/com/minelittlepony/common/model/IUnicorn.java @@ -1,14 +1,12 @@ -package com.minelittlepony.model.capabilities; +package com.minelittlepony.common.model; import net.minecraft.util.EnumHandSide; -import com.minelittlepony.render.model.PonyRenderer; - -public interface IModelUnicorn extends IModel { +public interface IUnicorn extends IModel { /** * Gets the arm used for holding items in their magic. */ - PonyRenderer getUnicornArmForSide(EnumHandSide side); + Arm getUnicornArmForSide(EnumHandSide side); /** * Returns true if this model is being applied to a race that can use magic. diff --git a/src/common/java/com/minelittlepony/model/PonyModelConstants.java b/src/common/java/com/minelittlepony/common/model/PonyModelConstants.java similarity index 97% rename from src/common/java/com/minelittlepony/model/PonyModelConstants.java rename to src/common/java/com/minelittlepony/common/model/PonyModelConstants.java index ce620e7d..804dcf15 100644 --- a/src/common/java/com/minelittlepony/model/PonyModelConstants.java +++ b/src/common/java/com/minelittlepony/common/model/PonyModelConstants.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model; +package com.minelittlepony.common.model; public interface PonyModelConstants { diff --git a/src/common/java/com/minelittlepony/model/armour/ArmourLayer.java b/src/common/java/com/minelittlepony/common/model/armour/ArmourLayer.java similarity index 81% rename from src/common/java/com/minelittlepony/model/armour/ArmourLayer.java rename to src/common/java/com/minelittlepony/common/model/armour/ArmourLayer.java index c12457d4..3d55980c 100644 --- a/src/common/java/com/minelittlepony/model/armour/ArmourLayer.java +++ b/src/common/java/com/minelittlepony/common/model/armour/ArmourLayer.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.armour; +package com.minelittlepony.common.model.armour; /** * The layer used to render a given armour piece. diff --git a/src/client/java/com/minelittlepony/model/capabilities/IModelArmour.java b/src/common/java/com/minelittlepony/common/model/armour/IArmour.java similarity index 90% rename from src/client/java/com/minelittlepony/model/capabilities/IModelArmour.java rename to src/common/java/com/minelittlepony/common/model/armour/IArmour.java index 714c9184..95f78586 100644 --- a/src/client/java/com/minelittlepony/model/capabilities/IModelArmour.java +++ b/src/common/java/com/minelittlepony/common/model/armour/IArmour.java @@ -1,17 +1,16 @@ -package com.minelittlepony.model.capabilities; +package com.minelittlepony.common.model.armour; -import net.minecraft.client.model.ModelBiped; import net.minecraft.inventory.EntityEquipmentSlot; -import com.minelittlepony.model.armour.ArmourLayer; +import com.minelittlepony.common.model.IModel; -public interface IModelArmour { +public interface IArmour { /** * Called to synchronise this model's legs with that of another. * * @param model The other model to mimic */ - void synchroniseLegs(T model); + void synchroniseLegs(IModel model); /** * Resets the state of this model to all invisible. diff --git a/src/common/java/com/minelittlepony/model/armour/IArmourTextureResolver.java b/src/common/java/com/minelittlepony/common/model/armour/IArmourTextureResolver.java similarity index 91% rename from src/common/java/com/minelittlepony/model/armour/IArmourTextureResolver.java rename to src/common/java/com/minelittlepony/common/model/armour/IArmourTextureResolver.java index 800a1be9..46263470 100644 --- a/src/common/java/com/minelittlepony/model/armour/IArmourTextureResolver.java +++ b/src/common/java/com/minelittlepony/common/model/armour/IArmourTextureResolver.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.armour; +package com.minelittlepony.common.model.armour; import net.minecraft.entity.EntityLivingBase; import net.minecraft.inventory.EntityEquipmentSlot; diff --git a/src/common/java/com/minelittlepony/model/armour/IEquestrianArmour.java b/src/common/java/com/minelittlepony/common/model/armour/IEquestrianArmour.java similarity index 50% rename from src/common/java/com/minelittlepony/model/armour/IEquestrianArmour.java rename to src/common/java/com/minelittlepony/common/model/armour/IEquestrianArmour.java index 981f8c9c..a8d771f8 100644 --- a/src/common/java/com/minelittlepony/model/armour/IEquestrianArmour.java +++ b/src/common/java/com/minelittlepony/common/model/armour/IEquestrianArmour.java @@ -1,9 +1,8 @@ -package com.minelittlepony.model.armour; +package com.minelittlepony.common.model.armour; -import com.minelittlepony.model.capabilities.IModelArmour; import com.minelittlepony.model.capabilities.IModelWrapper; -public interface IEquestrianArmour extends IModelWrapper { +public interface IEquestrianArmour extends IModelWrapper { /** * Gets the armour model to render for the given layer. */ diff --git a/src/common/java/com/minelittlepony/common/model/armour/package-info.java b/src/common/java/com/minelittlepony/common/model/armour/package-info.java new file mode 100644 index 00000000..9aea6ba1 --- /dev/null +++ b/src/common/java/com/minelittlepony/common/model/armour/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.common.model.armour; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/common/java/com/minelittlepony/pony/data/IPony.java b/src/common/java/com/minelittlepony/common/pony/IPony.java similarity index 95% rename from src/common/java/com/minelittlepony/pony/data/IPony.java rename to src/common/java/com/minelittlepony/common/pony/IPony.java index 3f560051..19bf163d 100644 --- a/src/common/java/com/minelittlepony/pony/data/IPony.java +++ b/src/common/java/com/minelittlepony/common/pony/IPony.java @@ -1,11 +1,12 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.pony; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.Vec3d; -import com.minelittlepony.MineLittlePony; +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.meta.Race; public interface IPony { @@ -76,7 +77,7 @@ public interface IPony { * * @param ignorePony True to ignore the client's current pony level setting. */ - PonyRace getRace(boolean ignorePony); + Race getRace(boolean ignorePony); /** * Returns true if an entity is riding a pony or other sentient life-form. diff --git a/src/common/java/com/minelittlepony/pony/data/IPonyData.java b/src/common/java/com/minelittlepony/common/pony/IPonyData.java similarity index 61% rename from src/common/java/com/minelittlepony/pony/data/IPonyData.java rename to src/common/java/com/minelittlepony/common/pony/IPonyData.java index 6dc10227..69e8b288 100644 --- a/src/common/java/com/minelittlepony/pony/data/IPonyData.java +++ b/src/common/java/com/minelittlepony/common/pony/IPonyData.java @@ -1,6 +1,11 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.pony; -import com.minelittlepony.model.anim.IInterpolator; +import com.minelittlepony.common.pony.meta.Gender; +import com.minelittlepony.common.pony.meta.Race; +import com.minelittlepony.common.pony.meta.Wearable; +import com.minelittlepony.common.pony.meta.Size; +import com.minelittlepony.common.pony.meta.TailLength; +import com.minelittlepony.util.animation.IInterpolator; import java.util.UUID; @@ -11,22 +16,22 @@ public interface IPonyData { /** * Gets this pony's race. */ - PonyRace getRace(); + Race getRace(); /** * Gets the length of the pony's tail. */ - TailLengths getTail(); + TailLength getTail(); /** * Get the pony's gender (usually female). */ - PonyGender getGender(); + Gender getGender(); /** * Gets the current pony size. */ - PonySize getSize(); + Size getSize(); /** * Gets the magical glow colour for magic-casting races. Returns 0 otherwise. @@ -41,7 +46,7 @@ public interface IPonyData { /** * Checks it this pony is wearing the given accessory. */ - boolean isWearing(PonyWearable wearable); + boolean isWearing(Wearable wearable); /** * Gets an interpolator for interpolating values. diff --git a/src/common/java/com/minelittlepony/pony/data/IPonyManager.java b/src/common/java/com/minelittlepony/common/pony/IPonyManager.java similarity index 98% rename from src/common/java/com/minelittlepony/pony/data/IPonyManager.java rename to src/common/java/com/minelittlepony/common/pony/IPonyManager.java index 1465c49e..57db4402 100644 --- a/src/common/java/com/minelittlepony/pony/data/IPonyManager.java +++ b/src/common/java/com/minelittlepony/common/pony/IPonyManager.java @@ -1,4 +1,4 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.pony; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; diff --git a/src/common/java/com/minelittlepony/pony/data/ITriggerPixelMapped.java b/src/common/java/com/minelittlepony/common/pony/ITriggerPixelMapped.java similarity index 95% rename from src/common/java/com/minelittlepony/pony/data/ITriggerPixelMapped.java rename to src/common/java/com/minelittlepony/common/pony/ITriggerPixelMapped.java index 3ea2bd15..73df1965 100644 --- a/src/common/java/com/minelittlepony/pony/data/ITriggerPixelMapped.java +++ b/src/common/java/com/minelittlepony/common/pony/ITriggerPixelMapped.java @@ -1,4 +1,4 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.pony; /** * Interface for enums that can be parsed from an image trigger pixel value. diff --git a/src/common/java/com/minelittlepony/pony/data/PonyGender.java b/src/common/java/com/minelittlepony/common/pony/meta/Gender.java similarity index 65% rename from src/common/java/com/minelittlepony/pony/data/PonyGender.java rename to src/common/java/com/minelittlepony/common/pony/meta/Gender.java index 7514d2a7..624dad67 100644 --- a/src/common/java/com/minelittlepony/pony/data/PonyGender.java +++ b/src/common/java/com/minelittlepony/common/pony/meta/Gender.java @@ -1,13 +1,15 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.pony.meta; -public enum PonyGender implements ITriggerPixelMapped { +import com.minelittlepony.common.pony.ITriggerPixelMapped; + +public enum Gender implements ITriggerPixelMapped { MARE(0), STALLION(0xffffff), ABOMONATION(0x888888); private int triggerValue; - PonyGender(int pixel) { + Gender(int pixel) { triggerValue = pixel; } diff --git a/src/common/java/com/minelittlepony/common/pony/meta/Race.java b/src/common/java/com/minelittlepony/common/pony/meta/Race.java new file mode 100644 index 00000000..734ec0a1 --- /dev/null +++ b/src/common/java/com/minelittlepony/common/pony/meta/Race.java @@ -0,0 +1,107 @@ +package com.minelittlepony.common.pony.meta; + +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.ITriggerPixelMapped; +import com.minelittlepony.common.settings.PonyLevel; + +import javax.annotation.Nonnull; + +public enum Race implements ITriggerPixelMapped { + + HUMAN(0, false, false), + EARTH(0xf9b131, false, false), + PEGASUS(0x88caf0, true, false), + UNICORN(0xd19fe4, false, true), + ALICORN(0xfef9fc, true, true), + CHANGELING(0x282b29, true, true), + ZEBRA(0xd0cccf, false, false), + REFORMED_CHANGELING(0xcaed5a, CHANGELING), + GRIFFIN(0xae9145, PEGASUS), + HIPPOGRIFF(0xd6ddac, PEGASUS), + BATPONY(0xeeeeee, true, false), + SEAPONY(0x3655dd, false, true); + + private boolean wings; + private boolean horn; + + private int triggerPixel; + + private final Race original; + + Race(int triggerPixel, boolean wings, boolean horn) { + this.triggerPixel = triggerPixel; + + this.wings = wings; + this.horn = horn; + + original = this; + } + + Race(int triggerPixel, Race cloneOf) { + cloneOf = cloneOf.getAlias(); + + this.triggerPixel = triggerPixel; + + this.wings = cloneOf.wings; + this.horn = cloneOf.horn; + + original = cloneOf; + } + + /** + * Returns true if this pony has a horn (and by extension can cast magic). + * @return + */ + public boolean hasHorn() { + return horn; + } + + /** + * Returns true if this pony has wings. If it has wings, it can fly, of course. + */ + public boolean hasWings() { + return wings; + } + + /** + * Returns true if this is a human. + */ + public boolean isHuman() { + return this == HUMAN; + } + + /** + * Gets the original race that this one is an alias for, if one exists. + * Otherwise returns this race. + */ + @Nonnull + public Race getAlias() { + return original; + } + + /** + * Returns true if this race is a virtual one. + */ + public boolean isVirtual() { + return getAlias() != this; + } + + /** + * Gets the actual race determined by the given pony level. + * PonyLevel.HUMANS would force all races to be humans. + * PonyLevel.BOTH is no change. + * PonyLevel.PONIES (should) return a pony if this is a human. Don't be fooled, though. It doesn't. + */ + public Race getEffectiveRace(boolean ignorePony) { + if (MineLittlePony.getInstance().getConfig().getEffectivePonyLevel(ignorePony) == PonyLevel.HUMANS) { + return HUMAN; + } + + return this; + } + + @Override + public int getTriggerPixel() { + return triggerPixel; + } +} diff --git a/src/common/java/com/minelittlepony/common/pony/meta/Size.java b/src/common/java/com/minelittlepony/common/pony/meta/Size.java new file mode 100644 index 00000000..5dc82fd1 --- /dev/null +++ b/src/common/java/com/minelittlepony/common/pony/meta/Size.java @@ -0,0 +1,41 @@ +package com.minelittlepony.common.pony.meta; + +import com.minelittlepony.common.MineLittlePony; +import com.minelittlepony.common.pony.ITriggerPixelMapped; + +public enum Size implements ITriggerPixelMapped { + TALL(0x534b76, 0.45f, 1.1F), + BULKY(0xce3254, 0.5f, 1), + LANKY(0x3254ce, 0.45F, 0.85F), + NORMAL(0, 0.4f, 0.8F), + YEARLING(0x53beff, 0.4F, 0.6F), + FOAL(0xffbe53, 0.25f, 0.6F); + + private int triggerValue; + + private float shadowSize; + private float scale; + + Size(int pixel, float shadowSz, float scaleF) { + triggerValue = pixel; + shadowSize = shadowSz; + scale = scaleF; + } + + public float getShadowSize() { + return shadowSize * MineLittlePony.getInstance().getConfig().getGlobalScaleFactor(); + } + + public float getScaleFactor() { + return scale * MineLittlePony.getInstance().getConfig().getGlobalScaleFactor(); + } + + @Override + public int getTriggerPixel() { + return triggerValue; + } + + public Size getEffectiveSize() { + return MineLittlePony.getInstance().getConfig().sizes ? this : Size.NORMAL; + } +} diff --git a/src/common/java/com/minelittlepony/pony/data/TailLengths.java b/src/common/java/com/minelittlepony/common/pony/meta/TailLength.java similarity index 56% rename from src/common/java/com/minelittlepony/pony/data/TailLengths.java rename to src/common/java/com/minelittlepony/common/pony/meta/TailLength.java index 4e71f467..87f95934 100644 --- a/src/common/java/com/minelittlepony/pony/data/TailLengths.java +++ b/src/common/java/com/minelittlepony/common/pony/meta/TailLength.java @@ -1,6 +1,8 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.pony.meta; -public enum TailLengths implements ITriggerPixelMapped { +import com.minelittlepony.common.pony.ITriggerPixelMapped; + +public enum TailLength implements ITriggerPixelMapped { STUB(0x425844), QUARTER(0xd19fe4), @@ -10,7 +12,7 @@ public enum TailLengths implements ITriggerPixelMapped { private int triggerValue; - TailLengths(int pixel) { + TailLength(int pixel) { triggerValue = pixel; } diff --git a/src/common/java/com/minelittlepony/pony/data/TriggerPixels.java b/src/common/java/com/minelittlepony/common/pony/meta/TriggerPixels.java similarity index 88% rename from src/common/java/com/minelittlepony/pony/data/TriggerPixels.java rename to src/common/java/com/minelittlepony/common/pony/meta/TriggerPixels.java index c277f982..5ee79956 100644 --- a/src/common/java/com/minelittlepony/pony/data/TriggerPixels.java +++ b/src/common/java/com/minelittlepony/common/pony/meta/TriggerPixels.java @@ -1,4 +1,6 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.pony.meta; + +import com.minelittlepony.common.pony.ITriggerPixelMapped; import java.awt.image.BufferedImage; @@ -8,12 +10,12 @@ import java.awt.image.BufferedImage; */ @SuppressWarnings("unchecked") public enum TriggerPixels { - RACE(PonyRace.HUMAN, Channel.ALL, 0, 0), - TAIL(TailLengths.FULL, Channel.ALL, 1, 0), - GENDER(PonyGender.MARE, Channel.ALL, 2, 0), - SIZE(PonySize.NORMAL, Channel.ALL, 3, 0), + RACE(Race.HUMAN, Channel.ALL, 0, 0), + TAIL(TailLength.FULL, Channel.ALL, 1, 0), + GENDER(Gender.MARE, Channel.ALL, 2, 0), + SIZE(Size.NORMAL, Channel.ALL, 3, 0), GLOW(null, Channel.RAW, 0, 1), - WEARABLES(PonyWearable.NONE, Channel.RAW, 1, 1); + WEARABLES(Wearable.NONE, Channel.RAW, 1, 1); private int x; private int y; diff --git a/src/common/java/com/minelittlepony/pony/data/PonyWearable.java b/src/common/java/com/minelittlepony/common/pony/meta/Wearable.java similarity index 51% rename from src/common/java/com/minelittlepony/pony/data/PonyWearable.java rename to src/common/java/com/minelittlepony/common/pony/meta/Wearable.java index f2d2a419..33478f24 100644 --- a/src/common/java/com/minelittlepony/pony/data/PonyWearable.java +++ b/src/common/java/com/minelittlepony/common/pony/meta/Wearable.java @@ -1,9 +1,11 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.pony.meta; + +import com.minelittlepony.common.pony.ITriggerPixelMapped; import java.util.ArrayList; import java.util.List; -public enum PonyWearable implements ITriggerPixelMapped { +public enum Wearable implements ITriggerPixelMapped { NONE(0), MUFFIN(50), HAT(100), @@ -13,7 +15,7 @@ public enum PonyWearable implements ITriggerPixelMapped { private int triggerValue; - PonyWearable(int pixel) { + Wearable(int pixel) { triggerValue = pixel; } @@ -22,12 +24,12 @@ public enum PonyWearable implements ITriggerPixelMapped { return triggerValue; } - public static PonyWearable[] flags(boolean[] flags) { - List wears = new ArrayList(); - PonyWearable[] values = values(); + public static Wearable[] flags(boolean[] flags) { + List wears = new ArrayList(); + Wearable[] values = values(); for (int i = 0; i < values.length; i++) { if (flags[i]) wears.add(values[i]); } - return wears.toArray(new PonyWearable[wears.size()]); + return wears.toArray(new Wearable[wears.size()]); } } diff --git a/src/common/java/com/minelittlepony/PonyConfig.java b/src/common/java/com/minelittlepony/common/settings/PonyConfig.java similarity index 95% rename from src/common/java/com/minelittlepony/PonyConfig.java rename to src/common/java/com/minelittlepony/common/settings/PonyConfig.java index d17f66be..d3999818 100644 --- a/src/common/java/com/minelittlepony/PonyConfig.java +++ b/src/common/java/com/minelittlepony/common/settings/PonyConfig.java @@ -1,11 +1,8 @@ -package com.minelittlepony; +package com.minelittlepony.common.settings; import net.minecraft.util.math.MathHelper; import com.google.gson.annotations.Expose; -import com.minelittlepony.pony.data.PonyLevel; -import com.minelittlepony.settings.SensibleConfig; - import com.voxelmodpack.hdskins.HDSkinManager; /** diff --git a/src/common/java/com/minelittlepony/pony/data/PonyLevel.java b/src/common/java/com/minelittlepony/common/settings/PonyLevel.java similarity index 86% rename from src/common/java/com/minelittlepony/pony/data/PonyLevel.java rename to src/common/java/com/minelittlepony/common/settings/PonyLevel.java index cf26cde3..117136bf 100644 --- a/src/common/java/com/minelittlepony/pony/data/PonyLevel.java +++ b/src/common/java/com/minelittlepony/common/settings/PonyLevel.java @@ -1,4 +1,4 @@ -package com.minelittlepony.pony.data; +package com.minelittlepony.common.settings; public enum PonyLevel { PONIES, diff --git a/src/common/java/com/minelittlepony/settings/SensibleConfig.java b/src/common/java/com/minelittlepony/common/settings/SensibleConfig.java similarity index 97% rename from src/common/java/com/minelittlepony/settings/SensibleConfig.java rename to src/common/java/com/minelittlepony/common/settings/SensibleConfig.java index c8bdb91f..4d175482 100644 --- a/src/common/java/com/minelittlepony/settings/SensibleConfig.java +++ b/src/common/java/com/minelittlepony/common/settings/SensibleConfig.java @@ -1,4 +1,4 @@ -package com.minelittlepony.settings; +package com.minelittlepony.common.settings; import com.minelittlepony.gui.IGuiCallback; diff --git a/src/common/java/com/minelittlepony/hdskins/gui/EntityPonyModel.java b/src/common/java/com/minelittlepony/hdskins/entity/EntityPonyModel.java similarity index 96% rename from src/common/java/com/minelittlepony/hdskins/gui/EntityPonyModel.java rename to src/common/java/com/minelittlepony/hdskins/entity/EntityPonyModel.java index 843fdc7c..6f8a9919 100644 --- a/src/common/java/com/minelittlepony/hdskins/gui/EntityPonyModel.java +++ b/src/common/java/com/minelittlepony/hdskins/entity/EntityPonyModel.java @@ -1,4 +1,4 @@ -package com.minelittlepony.hdskins.gui; +package com.minelittlepony.hdskins.entity; import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type; diff --git a/src/common/java/com/minelittlepony/model/anim/package-info.java b/src/common/java/com/minelittlepony/model/anim/package-info.java deleted file mode 100644 index cfa76076..00000000 --- a/src/common/java/com/minelittlepony/model/anim/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.model.anim; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/common/java/com/minelittlepony/model/armour/package-info.java b/src/common/java/com/minelittlepony/model/armour/package-info.java deleted file mode 100644 index ce1fed56..00000000 --- a/src/common/java/com/minelittlepony/model/armour/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@MethodsReturnNonnullByDefault -@ParametersAreNonnullByDefault -package com.minelittlepony.model.armour; - -import mcp.MethodsReturnNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/common/java/com/minelittlepony/model/capabilities/IModelWrapper.java b/src/common/java/com/minelittlepony/model/capabilities/IModelWrapper.java index 96212bc8..a927eeb5 100644 --- a/src/common/java/com/minelittlepony/model/capabilities/IModelWrapper.java +++ b/src/common/java/com/minelittlepony/model/capabilities/IModelWrapper.java @@ -1,6 +1,6 @@ package com.minelittlepony.model.capabilities; -import com.minelittlepony.pony.data.IPonyData; +import com.minelittlepony.common.pony.IPonyData; public interface IModelWrapper { /** diff --git a/src/common/java/com/minelittlepony/pony/data/PonySize.java b/src/common/java/com/minelittlepony/pony/data/PonySize.java deleted file mode 100644 index 315b4c0e..00000000 --- a/src/common/java/com/minelittlepony/pony/data/PonySize.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.minelittlepony.pony.data; - -import com.minelittlepony.MineLittlePony; -import com.minelittlepony.transform.PonyTransformation; - -public enum PonySize implements ITriggerPixelMapped { - TALL(0x534b76, 0.45f, 1.1F, PonyTransformation.TALL), - 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); - - private int triggerValue; - - private float shadowSize; - private float scale; - - private PonyTransformation transform; - - PonySize(int pixel, float shadowSz, float scaleF, PonyTransformation transformation) { - triggerValue = pixel; - shadowSize = shadowSz; - scale = scaleF; - transform = transformation; - } - - public float getShadowSize() { - return shadowSize * MineLittlePony.getInstance().getConfig().getGlobalScaleFactor(); - } - - public float getScaleFactor() { - return scale * MineLittlePony.getInstance().getConfig().getGlobalScaleFactor(); - } - - public PonyTransformation getTranformation() { - return transform; - } - - @Override - public int getTriggerPixel() { - return triggerValue; - } - - public PonySize getEffectiveSize() { - return MineLittlePony.getInstance().getConfig().sizes ? this : PonySize.NORMAL; - } -} diff --git a/src/common/java/com/minelittlepony/model/anim/BasicEasingInterpolator.java b/src/common/java/com/minelittlepony/util/animation/BasicEasingInterpolator.java similarity index 97% rename from src/common/java/com/minelittlepony/model/anim/BasicEasingInterpolator.java rename to src/common/java/com/minelittlepony/util/animation/BasicEasingInterpolator.java index 2ee1d450..48874279 100644 --- a/src/common/java/com/minelittlepony/model/anim/BasicEasingInterpolator.java +++ b/src/common/java/com/minelittlepony/util/animation/BasicEasingInterpolator.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.anim; +package com.minelittlepony.util.animation; import com.minelittlepony.util.chron.ChronicCache; import com.minelittlepony.util.chron.Touchable; diff --git a/src/common/java/com/minelittlepony/model/anim/IInterpolator.java b/src/common/java/com/minelittlepony/util/animation/IInterpolator.java similarity index 92% rename from src/common/java/com/minelittlepony/model/anim/IInterpolator.java rename to src/common/java/com/minelittlepony/util/animation/IInterpolator.java index ad271b70..156da133 100644 --- a/src/common/java/com/minelittlepony/model/anim/IInterpolator.java +++ b/src/common/java/com/minelittlepony/util/animation/IInterpolator.java @@ -1,4 +1,4 @@ -package com.minelittlepony.model.anim; +package com.minelittlepony.util.animation; /** * Interpolator function for handling transitions between animation states. diff --git a/src/common/java/com/minelittlepony/util/animation/package-info.java b/src/common/java/com/minelittlepony/util/animation/package-info.java new file mode 100644 index 00000000..6251f69b --- /dev/null +++ b/src/common/java/com/minelittlepony/util/animation/package-info.java @@ -0,0 +1,7 @@ +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +package com.minelittlepony.util.animation; + +import mcp.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/common/java/com/minelittlepony/util/render/FormattedTextureSupplier.java b/src/common/java/com/minelittlepony/util/resources/FormattedTextureSupplier.java similarity index 92% rename from src/common/java/com/minelittlepony/util/render/FormattedTextureSupplier.java rename to src/common/java/com/minelittlepony/util/resources/FormattedTextureSupplier.java index bf8fc7e2..90f79c4e 100644 --- a/src/common/java/com/minelittlepony/util/render/FormattedTextureSupplier.java +++ b/src/common/java/com/minelittlepony/util/resources/FormattedTextureSupplier.java @@ -1,4 +1,4 @@ -package com.minelittlepony.util.render; +package com.minelittlepony.util.resources; import net.minecraft.util.ResourceLocation; diff --git a/src/common/java/com/minelittlepony/util/render/ITextureSupplier.java b/src/common/java/com/minelittlepony/util/resources/ITextureSupplier.java similarity index 88% rename from src/common/java/com/minelittlepony/util/render/ITextureSupplier.java rename to src/common/java/com/minelittlepony/util/resources/ITextureSupplier.java index 2e47649d..1a66a904 100644 --- a/src/common/java/com/minelittlepony/util/render/ITextureSupplier.java +++ b/src/common/java/com/minelittlepony/util/resources/ITextureSupplier.java @@ -1,4 +1,4 @@ -package com.minelittlepony.util.render; +package com.minelittlepony.util.resources; import net.minecraft.util.ResourceLocation; diff --git a/src/common/java/com/minelittlepony/util/render/IntStringMapper.java b/src/common/java/com/minelittlepony/util/resources/IntStringMapper.java similarity index 96% rename from src/common/java/com/minelittlepony/util/render/IntStringMapper.java rename to src/common/java/com/minelittlepony/util/resources/IntStringMapper.java index 5dcda33a..17303fa2 100644 --- a/src/common/java/com/minelittlepony/util/render/IntStringMapper.java +++ b/src/common/java/com/minelittlepony/util/resources/IntStringMapper.java @@ -1,4 +1,4 @@ -package com.minelittlepony.util.render; +package com.minelittlepony.util.resources; import com.google.common.collect.Maps; diff --git a/src/common/java/com/minelittlepony/transform/MotionCompositor.java b/src/common/java/com/minelittlepony/util/transform/MotionCompositor.java similarity index 97% rename from src/common/java/com/minelittlepony/transform/MotionCompositor.java rename to src/common/java/com/minelittlepony/util/transform/MotionCompositor.java index 3d29aeea..4c008a38 100644 --- a/src/common/java/com/minelittlepony/transform/MotionCompositor.java +++ b/src/common/java/com/minelittlepony/util/transform/MotionCompositor.java @@ -1,4 +1,4 @@ -package com.minelittlepony.transform; +package com.minelittlepony.util.transform; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.MathHelper; diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java index fd442771..b27de299 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java @@ -45,7 +45,7 @@ public class RenderPlayerModel extends RenderLiving this.addLayer(this.getElytraLayer()); } - protected LayerRenderer getElytraLayer() { + protected LayerRenderer getElytraLayer() { final ModelElytra modelElytra = new ModelElytra(); return new LayerRenderer() { @Override