Finish the split up

This commit is contained in:
Sollace 2019-03-23 21:49:34 +02:00
parent edc70b302e
commit ccd95827c2
196 changed files with 1205 additions and 1110 deletions

View file

@ -1,4 +1,4 @@
package com.minelittlepony;
package com.minelittlepony.client;
import com.mumfrey.liteloader.util.ModUtilities;
import net.minecraft.client.model.ModelBiped;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -1,4 +1,4 @@
package com.minelittlepony;
package com.minelittlepony.client;
import com.voxelmodpack.hdskins.ISkinModifier;

View file

@ -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));
}

View file

@ -1,4 +1,4 @@
package com.minelittlepony.ducks;
package com.minelittlepony.client.ducks;
public interface IRenderItem {

View file

@ -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<T extends EntityLivingBase> 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);

View file

@ -1,6 +1,6 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.ducks;
package com.minelittlepony.client.ducks;
import mcp.MethodsReturnNonnullByDefault;

View file

@ -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.

View file

@ -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<String> 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)));
}
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -1,4 +1,4 @@
package com.minelittlepony.mixin;
package com.minelittlepony.client.mixin;
import java.util.Map;

View file

@ -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;

View file

@ -1,6 +1,6 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.hdskins.gui;
package com.minelittlepony.client.mixin;
import mcp.MethodsReturnNonnullByDefault;

View file

@ -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);
}
/**

View file

@ -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<ModelRenderer> {
}

View file

@ -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.
*

View file

@ -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());

View file

@ -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;

View file

@ -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 <T extends ModelBiped & IModel> 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

View file

@ -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<ModelPonyArmor> {

View file

@ -0,0 +1,7 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.client.model.armour;
import mcp.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault;

View file

@ -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<T extends AbstractPonyModel & IModelPegasus> extends PegasusWings<T> {
public class BatWings<T extends AbstractPonyModel & IPegasus> extends PegasusWings<T> {
public BatWings(T model, float yOffset, float stretch) {
super(model, yOffset, stretch);

View file

@ -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<T extends AbstractPonyModel & IModelPegasus> extends PegasusWings<T> {
public class BugWings<T extends AbstractPonyModel & IPegasus> extends PegasusWings<T> {
public BugWings(T model, float yOffset, float stretch) {
super(model, yOffset, stretch);

View file

@ -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<T extends AbstractPonyModel & IModelPegasus> extends ModelWing<T> {
public class ModelBatWing<T extends AbstractPonyModel & IPegasus> extends ModelWing<T> {
public ModelBatWing(T pegasus, boolean right, boolean legacy, float y, float scale, int texY) {
super(pegasus, right, legacy, y, scale, texY);

View file

@ -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<T extends AbstractPonyModel & IModelPegasus> extends ModelWing<T> {
public class ModelBugWing<T extends AbstractPonyModel & IPegasus> extends ModelWing<T> {
public ModelBugWing(T pegasus, boolean right, boolean legacy, float y, float scale, int texY) {
super(pegasus, right, legacy, y, scale, texY);

View file

@ -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;

View file

@ -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<ModelRenderer> {
private PonySnout snout;

View file

@ -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<T extends AbstractPonyModel & IModelPegasus> implements PonyModelConstants {
public class ModelWing<T extends AbstractPonyModel & IPegasus> implements PonyModelConstants {
protected final T pegasus;
@ -64,7 +64,7 @@ public class ModelWing<T extends AbstractPonyModel & IModelPegasus> 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);

View file

@ -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<T extends AbstractPonyModel & IModelPegasus> implements IModelPart {
import static com.minelittlepony.common.model.PonyModelConstants.*;
public class PegasusWings<T extends AbstractPonyModel & IPegasus> implements IPart {
protected final T pegasus;
@ -39,7 +39,7 @@ public class PegasusWings<T extends AbstractPonyModel & IModelPegasus> implement
}
public ModelWing<T> 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<T extends AbstractPonyModel & IModelPegasus> 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;
}
}

View file

@ -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.

View file

@ -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<ModelRenderer> head;
public <T extends ModelBase & ICapitated> PonySnout(T pony) {
public <T extends ModelBase & ICapitated<ModelRenderer>> PonySnout(T pony) {
this(pony, 0, 0, 0);
}
public <T extends ModelBase & ICapitated> PonySnout(T pony, int x, int y, int z) {
public <T extends ModelBase & ICapitated<ModelRenderer>> 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());

View file

@ -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;

View file

@ -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;

View file

@ -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 <T extends ModelBase & ICapitated> UnicornHorn(T pony, float yOffset, float stretch) {
public <T extends ModelBase & ICapitated<ModelRenderer>> UnicornHorn(T pony, float yOffset, float stretch) {
this(pony, yOffset, stretch, 0, 0, 0);
}
public <T extends ModelBase & ICapitated> UnicornHorn(T pony, float yOffset, float stretch, int x, int y, int z) {
public <T extends ModelBase & ICapitated<ModelRenderer>> 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);

View file

@ -0,0 +1,7 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.client.model.components;
import mcp.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault;

View file

@ -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 {

View file

@ -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 {

View file

@ -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

View file

@ -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());
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -0,0 +1,7 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.client.model.entities;
import mcp.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault;

View file

@ -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 {

View file

@ -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();
}

View file

@ -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) {
}

View file

@ -1,4 +1,4 @@
package com.minelittlepony.model.gear;
package com.minelittlepony.client.model.gear;
public interface IStackable {
float getStackingOffset();

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,7 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.client.model;
import mcp.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault;

View file

@ -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<ModelAlicorn> wings;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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<ModelPegasus> wings;

View file

@ -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<PonyRenderer> {
public PonyRenderer unicornArmRight;
public PonyRenderer unicornArmLeft;

View file

@ -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());
}

View file

@ -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<Race, PlayerModels> 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);
}
}

View file

@ -1,6 +1,6 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.model.capabilities;
package com.minelittlepony.client.model.races;
import mcp.MethodsReturnNonnullByDefault;

View file

@ -1,6 +1,6 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.mixin;
package com.minelittlepony.client;
import mcp.MethodsReturnNonnullByDefault;

View file

@ -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<Pony> 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<Pony> 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<Pony> 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)

View file

@ -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();
}

View file

@ -1,4 +1,4 @@
package com.minelittlepony.pony.data;
package com.minelittlepony.client.pony;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonElement;

View file

@ -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;

View file

@ -1,6 +1,6 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.model;
package com.minelittlepony.client.pony;
import mcp.MethodsReturnNonnullByDefault;

View file

@ -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.*;

View file

@ -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<T extends EntityLivingBase> implements ICamera {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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 {

View file

@ -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<EntityEnderman> 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

View file

@ -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<EntityGuardian> ponyRenderer;
public RenderPonyGuardian(RenderManager manager) {
super(manager);
mainModel = PMAPI.seapony.getBody();
mainModel = MODEL_WRAPPER.getBody();
ponyRenderer = new RenderPonyMob.Proxy<EntityGuardian>(layerRenderers, manager, PMAPI.seapony) {
ponyRenderer = new RenderPonyMob.Proxy<EntityGuardian>(layerRenderers, manager, MODEL_WRAPPER) {
@Override
public ResourceLocation getTexture(EntityGuardian entity) {
return RenderPonyGuardian.this.getTexture(entity);

View file

@ -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<T extends AbstractIllager> 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

View file

@ -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<Skeleton extends AbstractSkeleton> 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

View file

@ -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
*/

View file

@ -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<EntityVillager> {
private static final ITextureSupplier<Integer> 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

View file

@ -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<EntityWitch> {
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

View file

@ -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<Zombie extends EntityZombie> 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<Zombie extends EntityZombie> extends RenderPonyMob
return ZOMBIE;
}
public static class Pigman extends RenderPonyZombie<EntityPigZombie> {
public Pigman(RenderManager manager) {
super(manager);
}
@Override
public ResourceLocation getTexture(EntityPigZombie entity) {
return PIGMAN;
}
}
public static class Husk extends RenderPonyZombie<EntityHusk> {
public Husk(RenderManager manager) {
@ -45,7 +63,7 @@ public class RenderPonyZombie<Zombie extends EntityZombie> extends RenderPonyMob
public static class Giant extends RenderPonyMob<EntityGiantZombie> {
public Giant(RenderManager manager) {
super(manager, PMAPI.zombie);
super(manager, MODEL_WRAPPER);
}
@Override

View file

@ -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<EntityZombieVillager
private static final ITextureSupplier<Integer> 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

View file

@ -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;

View file

@ -0,0 +1,7 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.client.render.entities;
import mcp.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault;

View file

@ -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;

View file

@ -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;

View file

@ -0,0 +1,7 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package com.minelittlepony.client.render.entities.player;
import mcp.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault;

View file

@ -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<T extends EntityLivingBase> implements LayerRenderer<EntityLivingBase> {
public abstract class AbstractPonyLayer<T extends EntityLivingBase> implements LayerRenderer<T> {
private final RenderLivingBase<T> renderer;
@ -17,13 +17,6 @@ public abstract class AbstractPonyLayer<T extends EntityLivingBase> 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<T extends EntityLivingBase> 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<T> getRenderer() {
return renderer;

View file

@ -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<AbstractClientPlayer> {
@ -16,7 +16,7 @@ public class LayerDJPon3Head extends AbstractPonyLayer<AbstractClientPlayer> {
}
@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());

View file

@ -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<AbstractClientPlayer> {
@ -27,7 +27,7 @@ public class LayerEntityOnPonyShoulder extends AbstractPonyLayer<AbstractClientP
}
@Override
public void doPonyRender(AbstractClientPlayer player, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) {
public void doRenderLayer(AbstractClientPlayer player, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) {
GlStateManager.enableRescaleNormal();
GlStateManager.color(1, 1, 1, 1);

View file

@ -1,4 +1,4 @@
package com.minelittlepony.render.layer;
package com.minelittlepony.client.render.layer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
@ -18,7 +18,7 @@ public class LayerEyeGlow<T extends EntityLiving> extends AbstractPonyLayer<T> {
}
@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();

View file

@ -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<T extends EntityLivingBase> extends AbstractPonyLayer<T>
}
@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<T extends EntityLivingBase> extends AbstractPonyLayer<T>
}
}
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);

View file

@ -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<T extends AbstractIllager> extends LayerHeldPonyItem<T> {
public LayerHeldItemIllager(RenderLivingBase<T> livingPony) {
@ -14,9 +14,9 @@ public class LayerHeldItemIllager<T extends AbstractIllager> 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);
}
}

View file

@ -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<T extends EntityLivingBase> 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();

Some files were not shown because too many files have changed in this diff Show more