Rename some things.

This commit is contained in:
Matthew Messinger 2015-12-15 23:29:47 -05:00
parent 8dea16d563
commit 69d1f76ada
35 changed files with 138 additions and 137 deletions

View file

@ -23,7 +23,7 @@ public class PonyData {
private static final Map<Integer, PonySize> SIZE_COLORS = ImmutableBiMap.<Integer, PonySize> builder()
.put(0xffbe53, PonySize.FOAL)
.put(0xce3254, PonySize.LARGE)
.put(0x534b76, PonySize.PRINCESS)
.put(0x534b76, PonySize.TALL)
.build();
private PonyRace race = PonyRace.EARTH;

View file

@ -4,5 +4,5 @@ public enum PonySize {
NORMAL,
LARGE,
FOAL,
PRINCESS
TALL
}

View file

@ -2,10 +2,10 @@ package com.brohoof.minelittlepony.model;
import com.brohoof.minelittlepony.PonyData;
public abstract class ModelArmor {
public abstract class AbstractArmor {
public ModelPony modelArmorChestplate;
public ModelPony modelArmor;
public AbstractPonyModel modelArmorChestplate;
public AbstractPonyModel modelArmor;
public float layer() {
return 1;

View file

@ -11,7 +11,7 @@ import com.brohoof.minelittlepony.Pony;
import com.brohoof.minelittlepony.PonyData;
import com.brohoof.minelittlepony.PonySize;
import com.brohoof.minelittlepony.model.part.IPonyPart;
import com.brohoof.minelittlepony.model.pony.pm_newPonyAdv;
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
import com.brohoof.minelittlepony.renderer.AniParams;
import com.brohoof.minelittlepony.renderer.PlaneRenderer;
import com.google.common.collect.Lists;
@ -28,7 +28,7 @@ import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
public abstract class ModelPony extends ModelPlayer {
public abstract class AbstractPonyModel extends ModelPlayer {
protected float scale = 0.0625F;
public boolean isArmour = false;
@ -40,7 +40,7 @@ public abstract class ModelPony extends ModelPlayer {
protected List<IPonyPart> modelParts = Lists.newArrayList();
public ModelPony() {
public AbstractPonyModel() {
super(0, false);
}
@ -235,7 +235,7 @@ public abstract class ModelPony extends ModelPlayer {
translate(0.0F, 0.12F, 0.0F);
}
if (this instanceof pm_newPonyAdv && ((pm_newPonyAdv) this).rainboom) {
if (this instanceof ModelPlayerPony && ((ModelPlayerPony) this).rainboom) {
translate(0.0F, -0.08F, 0.0F);
}
@ -279,7 +279,7 @@ public abstract class ModelPony extends ModelPlayer {
scale(1.15F, 1.12F, 1.15F);
break;
}
} else if (this.metadata.getSize() == PonySize.PRINCESS) {
} else if (this.metadata.getSize() == PonySize.TALL) {
if (this.isSleeping && !this.isArmour) {
translate(0.0F, -0.43F, 0.25F);
}
@ -306,7 +306,7 @@ public abstract class ModelPony extends ModelPlayer {
case LEGS:
translate(0.0F, -0.25F, 0.03F);
scale(1.0F, 1.18F, 1.0F);
if (this instanceof pm_newPonyAdv && ((pm_newPonyAdv) this).rainboom) {
if (this instanceof ModelPlayerPony && ((ModelPlayerPony) this).rainboom) {
translate(0.0F, 0.05F, 0.0F);
}
break;
@ -321,8 +321,8 @@ public abstract class ModelPony extends ModelPlayer {
@Override
public void setModelAttributes(ModelBase model) {
super.setModelAttributes(model);
if (model instanceof ModelPony) {
ModelPony pony = (ModelPony) model;
if (model instanceof AbstractPonyModel) {
AbstractPonyModel pony = (AbstractPonyModel) model;
this.isFlying = pony.isFlying;
this.isSleeping = pony.isSleeping;
this.isVillager = pony.isVillager;

View file

@ -2,22 +2,23 @@ package com.brohoof.minelittlepony.model;
import java.lang.reflect.Field;
import com.brohoof.minelittlepony.model.pony.pm_Human;
import com.brohoof.minelittlepony.model.pony.pm_newPonyAdv;
import com.brohoof.minelittlepony.model.pony.pm_skeletonPony;
import com.brohoof.minelittlepony.model.pony.pm_zombiePony;
import com.brohoof.minelittlepony.model.pony.armor.pma_Human;
import com.brohoof.minelittlepony.model.pony.armor.pma_newPony;
import com.brohoof.minelittlepony.model.pony.armor.pma_skeletonPony;
import com.brohoof.minelittlepony.model.pony.armor.pma_zombiePony;
import com.brohoof.minelittlepony.model.pony.ModelHumanPlayer;
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
import com.brohoof.minelittlepony.model.pony.ModelSkeletonPony;
import com.brohoof.minelittlepony.model.pony.ModelVillagerPony;
import com.brohoof.minelittlepony.model.pony.ModelZombiePony;
import com.brohoof.minelittlepony.model.pony.armor.HumanArmors;
import com.brohoof.minelittlepony.model.pony.armor.PonyArmors;
import com.brohoof.minelittlepony.model.pony.armor.SkeletonPonyArmors;
import com.brohoof.minelittlepony.model.pony.armor.ZombiePonyArmors;
public final class PMAPI {
public static final PlayerModel pony = new PlayerModel(new pm_newPonyAdv()).setArmor(new pma_newPony());
public static final PlayerModel zombie = new PlayerModel(new pm_zombiePony()).setArmor(new pma_zombiePony());
public static final PlayerModel skeleton = new PlayerModel(new pm_skeletonPony()).setArmor(new pma_skeletonPony());
public static final PlayerModel villager = new PlayerModel(new ModelVillagerPony()).setArmor(new pma_newPony());
public static final PlayerModel human = new PlayerModel(new pm_Human()).setArmor(new pma_Human());
public static final PlayerModel pony = new PlayerModel(new ModelPlayerPony()).setArmor(new PonyArmors());
public static final PlayerModel zombie = new PlayerModel(new ModelZombiePony()).setArmor(new ZombiePonyArmors());
public static final PlayerModel skeleton = new PlayerModel(new ModelSkeletonPony()).setArmor(new SkeletonPonyArmors());
public static final PlayerModel villager = new PlayerModel(new ModelVillagerPony()).setArmor(new PonyArmors());
public static final PlayerModel human = new PlayerModel(new ModelHumanPlayer()).setArmor(new HumanArmors());
public static void init() {
for (Field field : PMAPI.class.getFields()) {

View file

@ -4,11 +4,11 @@ import com.brohoof.minelittlepony.PonyData;
public class PlayerModel {
private final ModelPony model;
private ModelArmor armor;
private final AbstractPonyModel model;
private AbstractArmor armor;
private float shadowsize = 0.5F;
public PlayerModel(ModelPony model) {
public PlayerModel(AbstractPonyModel model) {
this.model = model;
}
@ -17,11 +17,11 @@ public class PlayerModel {
return this;
}
public ModelPony getModel() {
public AbstractPonyModel getModel() {
return model;
}
public PlayerModel setArmor(ModelArmor armor) {
public PlayerModel setArmor(AbstractArmor armor) {
this.armor = armor;
return this;
}
@ -41,7 +41,7 @@ public class PlayerModel {
getArmor().modelArmor.init(0.0F, 0.5F);
}
public ModelArmor getArmor() {
public AbstractArmor getArmor() {
return armor;
}

View file

@ -2,15 +2,15 @@ package com.brohoof.minelittlepony.model.part;
import com.brohoof.minelittlepony.PonyData;
import com.brohoof.minelittlepony.model.BodyPart;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.renderer.AniParams;
public abstract class AbstractHeadPart implements IPonyPart {
private ModelPony pony;
private AbstractPonyModel pony;
@Override
public void init(ModelPony pony, float yOffset, float stretch) {
public void init(AbstractPonyModel pony, float yOffset, float stretch) {
this.pony = pony;
}
@ -45,7 +45,7 @@ public abstract class AbstractHeadPart implements IPonyPart {
rotate(x, y);
}
protected ModelPony getPony() {
protected AbstractPonyModel getPony() {
return pony;
}

View file

@ -1,12 +1,12 @@
package com.brohoof.minelittlepony.model.part;
import com.brohoof.minelittlepony.PonyData;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.renderer.AniParams;
public interface IPonyPart {
void init(ModelPony pony, float yOffset, float stretch);
void init(AbstractPonyModel pony, float yOffset, float stretch);
void animate(PonyData data, AniParams ani);

View file

@ -2,7 +2,7 @@ package com.brohoof.minelittlepony.model.part;
import com.brohoof.minelittlepony.PonyData;
import com.brohoof.minelittlepony.model.BodyPart;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.model.PonyModelConstants;
import com.brohoof.minelittlepony.renderer.AniParams;
import com.brohoof.minelittlepony.renderer.CompressiveRendering;
@ -12,7 +12,7 @@ import net.minecraft.util.MathHelper;
public class PegasusWings implements IPonyPart, PonyModelConstants {
private ModelPony pony;
private AbstractPonyModel pony;
public ModelRenderer[] leftWing;
public ModelRenderer[] rightWing;
@ -24,7 +24,7 @@ public class PegasusWings implements IPonyPart, PonyModelConstants {
public CompressiveRendering compressiveRightWing;
@Override
public void init(ModelPony pony, float yOffset, float stretch) {
public void init(AbstractPonyModel pony, float yOffset, float stretch) {
this.pony = pony;
this.leftWing = new ModelRenderer[3];

View file

@ -1,7 +1,7 @@
package com.brohoof.minelittlepony.model.part;
import com.brohoof.minelittlepony.PonyData;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.model.PonyModelConstants;
import net.minecraft.client.model.ModelRenderer;
@ -12,7 +12,7 @@ public class PonyEars extends AbstractHeadPart implements PonyModelConstants {
private ModelRenderer right;
@Override
public void init(ModelPony pony, float yOffset, float stretch) {
public void init(AbstractPonyModel pony, float yOffset, float stretch) {
super.init(pony, yOffset, stretch);
this.left = new ModelRenderer(pony, 12, 16);
this.right = new ModelRenderer(pony, 12, 16);

View file

@ -5,7 +5,7 @@ import java.util.Map;
import com.brohoof.minelittlepony.MineLittlePony;
import com.brohoof.minelittlepony.PonyData;
import com.brohoof.minelittlepony.PonyGender;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.model.PonyModelConstants;
import com.brohoof.minelittlepony.renderer.PlaneRenderer;
import com.google.common.collect.ImmutableMap;
@ -18,7 +18,7 @@ public class PonySnout extends AbstractHeadPart implements PonyModelConstants {
.build();
@Override
public void init(ModelPony pony, float yOffset, float stretch) {
public void init(AbstractPonyModel pony, float yOffset, float stretch) {
super.init(pony, yOffset, stretch);
PlaneRenderer[] muzzle = map.get(PonyGender.MARE);

View file

@ -5,7 +5,7 @@ import static net.minecraft.client.renderer.GlStateManager.*;
import org.lwjgl.opengl.GL11;
import com.brohoof.minelittlepony.PonyData;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.model.PonyModelConstants;
import com.brohoof.minelittlepony.renderer.HornGlowRenderer;
@ -17,7 +17,7 @@ public class UnicornHorn extends AbstractHeadPart implements PonyModelConstants
private HornGlowRenderer[] hornglow;
@Override
public void init(ModelPony pony, float yOffset, float stretch) {
public void init(AbstractPonyModel pony, float yOffset, float stretch) {
super.init(pony, yOffset, stretch);
this.horn = new ModelRenderer(pony, 0, 3);

View file

@ -1,10 +1,10 @@
package com.brohoof.minelittlepony.model.pony;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import net.minecraft.client.model.ModelRenderer;
public class pm_Human extends ModelPony {
public class ModelHumanPlayer extends AbstractPonyModel {
public ModelRenderer bipedEars;
public ModelRenderer cloak;

View file

@ -9,7 +9,7 @@ import static net.minecraft.client.renderer.GlStateManager.translate;
import java.util.Random;
import com.brohoof.minelittlepony.PonySize;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.model.PonyModelConstants;
import com.brohoof.minelittlepony.model.part.PegasusWings;
import com.brohoof.minelittlepony.model.part.PonyEars;
@ -22,7 +22,7 @@ import com.brohoof.minelittlepony.renderer.PlaneRenderer;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.util.MathHelper;
public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
public class ModelPlayerPony extends AbstractPonyModel implements PonyModelConstants {
public boolean rainboom;
@ -34,7 +34,7 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
public ModelRenderer unicornarm;
public PlaneRenderer[] Tail;
public pm_newPonyAdv() {
public ModelPlayerPony() {
addParts();
}
@ -561,7 +561,7 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
scale(1.15F, 1.12F, 1.15F);
this.renderLegs();
popMatrix();
} else if (this.metadata.getSize() == PonySize.PRINCESS) {
} else if (this.metadata.getSize() == PonySize.TALL) {
if (this.isSleeping && !this.isArmour) {
translate(0.0F, -0.43F, 0.25F);
}

View file

@ -7,7 +7,7 @@ import static net.minecraft.client.renderer.GlStateManager.translate;
import net.minecraft.util.MathHelper;
public class pm_skeletonPony extends pm_newPonyAdv {
public class ModelSkeletonPony extends ModelPlayerPony {
@Override
protected void rotateLegs(float move, float swing, float tick) {

View file

@ -1,12 +1,11 @@
package com.brohoof.minelittlepony.model;
package com.brohoof.minelittlepony.model.pony;
import com.brohoof.minelittlepony.model.pony.pm_newPonyAdv;
import com.brohoof.minelittlepony.renderer.AniParams;
import com.brohoof.minelittlepony.renderer.PlaneRenderer;
import net.minecraft.util.MathHelper;
public class ModelVillagerPony extends pm_newPonyAdv {
public class ModelVillagerPony extends ModelPlayerPony {
public PlaneRenderer[] VillagerBagPiece;
public PlaneRenderer VillagerApron;

View file

@ -1,10 +1,10 @@
package com.brohoof.minelittlepony.model.pony;
import com.brohoof.minelittlepony.model.pony.pm_newPonyAdv;
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
import net.minecraft.util.MathHelper;
public class pm_zombiePony extends pm_newPonyAdv {
public class ModelZombiePony extends ModelPlayerPony {
@Override
protected void rotateLegs(float move, float swing, float tick) {

View file

@ -0,0 +1,13 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.AbstractArmor;
import com.brohoof.minelittlepony.model.pony.ModelHumanPlayer;
public class HumanArmors extends AbstractArmor {
public HumanArmors() {
this.modelArmorChestplate = new ModelHumanPlayer();
this.modelArmor = new ModelHumanPlayer();
}
}

View file

@ -1,20 +1,21 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.part.PonyEars;
import com.brohoof.minelittlepony.model.pony.pm_newPonyAdv;
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
import com.brohoof.minelittlepony.renderer.AniParams;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.util.MathHelper;
public class pm_newPonyArmor extends pm_newPonyAdv {
public class ModelPonyArmor extends ModelPlayerPony {
public ModelRenderer Bodypiece;
public ModelRenderer extBody;
public ModelRenderer[] extHead;
public ModelRenderer[] extLegs;
public pm_newPonyArmor() {
public ModelPonyArmor() {
this.isArmour = true;
this.textureHeight = 32;
}

View file

@ -1,10 +1,10 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.pony.armor.pm_newPonyArmor;
import com.brohoof.minelittlepony.model.pony.armor.ModelPonyArmor;
import net.minecraft.util.MathHelper;
public class pm_skeletonPonyArmor extends pm_newPonyArmor {
public class ModelSkeletonPonyArmor extends ModelPonyArmor {
@Override
protected void rotateLegs(float move, float swing, float tick) {

View file

@ -1,10 +1,10 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.pony.armor.pm_newPonyArmor;
import com.brohoof.minelittlepony.model.pony.armor.ModelPonyArmor;
import net.minecraft.util.MathHelper;
public class pm_zombiePonyArmor extends pm_newPonyArmor {
public class ModelZombiePonyArmor extends ModelPonyArmor {
@Override
protected void rotateLegs(float move, float swing, float tick) {

View file

@ -0,0 +1,11 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.AbstractArmor;
public class PonyArmors extends AbstractArmor {
public PonyArmors() {
this.modelArmorChestplate = new ModelPonyArmor();
this.modelArmor = new ModelPonyArmor();
}
}

View file

@ -0,0 +1,11 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.AbstractArmor;
public class SkeletonPonyArmors extends AbstractArmor {
public SkeletonPonyArmors() {
this.modelArmorChestplate = new ModelSkeletonPonyArmor();
this.modelArmor = new ModelSkeletonPonyArmor();
}
}

View file

@ -0,0 +1,11 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.AbstractArmor;
public class ZombiePonyArmors extends AbstractArmor {
public ZombiePonyArmors() {
this.modelArmorChestplate = new ModelZombiePonyArmor();
this.modelArmor = new ModelZombiePonyArmor();
}
}

View file

@ -1,13 +0,0 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.ModelArmor;
import com.brohoof.minelittlepony.model.pony.pm_Human;
public class pma_Human extends ModelArmor {
public pma_Human() {
this.modelArmorChestplate = new pm_Human();
this.modelArmor = new pm_Human();
}
}

View file

@ -1,11 +0,0 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.ModelArmor;
public class pma_newPony extends ModelArmor {
public pma_newPony() {
this.modelArmorChestplate = new pm_newPonyArmor();
this.modelArmor = new pm_newPonyArmor();
}
}

View file

@ -1,11 +0,0 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.ModelArmor;
public class pma_skeletonPony extends ModelArmor {
public pma_skeletonPony() {
this.modelArmorChestplate = new pm_skeletonPonyArmor();
this.modelArmor = new pm_skeletonPonyArmor();
}
}

View file

@ -1,11 +0,0 @@
package com.brohoof.minelittlepony.model.pony.armor;
import com.brohoof.minelittlepony.model.ModelArmor;
public class pma_zombiePony extends ModelArmor {
public pma_zombiePony() {
this.modelArmorChestplate = new pm_zombiePonyArmor();
this.modelArmor = new pm_zombiePonyArmor();
}
}

View file

@ -7,7 +7,7 @@ import com.brohoof.minelittlepony.Pony;
import com.brohoof.minelittlepony.PonySize;
import com.brohoof.minelittlepony.model.PMAPI;
import com.brohoof.minelittlepony.model.PlayerModel;
import com.brohoof.minelittlepony.model.pony.pm_Human;
import com.brohoof.minelittlepony.model.pony.ModelHumanPlayer;
import com.brohoof.minelittlepony.renderer.layer.LayerHeldPonyItem;
import com.brohoof.minelittlepony.renderer.layer.LayerPonyArmor;
import com.brohoof.minelittlepony.renderer.layer.LayerPonyCape;
@ -79,7 +79,7 @@ public abstract class RenderPony extends RendererLivingEntity implements IRender
this.shadowSize = 0.25F;
else if (size == PonySize.NORMAL)
this.shadowSize = 0.4F;
else if (size == PonySize.PRINCESS)
else if (size == PonySize.TALL)
this.shadowSize = 0.45F;
else
this.shadowSize = 0.5F;
@ -110,7 +110,7 @@ public abstract class RenderPony extends RendererLivingEntity implements IRender
@Obfuscated({ "a", "func_77039_a" })
public void setupPlayerScale(AbstractClientPlayer player, double xPosition, double yPosition, double zPosition) {
if (MineLittlePony.getConfig().getShowScale().get() && !(playerModel.getModel() instanceof pm_Human)) {
if (MineLittlePony.getConfig().getShowScale().get() && !(playerModel.getModel() instanceof ModelHumanPlayer)) {
PonySize size = thePony.metadata.getSize();
if (size == PonySize.LARGE)
scale(0.9F, 0.9F, 0.9F);

View file

@ -4,7 +4,7 @@ import com.brohoof.minelittlepony.MineLittlePony;
import com.brohoof.minelittlepony.PonyGender;
import com.brohoof.minelittlepony.PonyRace;
import com.brohoof.minelittlepony.TailLengths;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.model.PlayerModel;
import com.brohoof.minelittlepony.renderer.layer.LayerHeldPonyItem;
import com.brohoof.minelittlepony.renderer.layer.LayerPonyArmor;
@ -20,7 +20,7 @@ import net.minecraft.util.ResourceLocation;
public abstract class RenderPonyMob<T extends EntityLiving> extends RenderLiving implements IRenderPony {
protected ModelPony mobModel;
protected AbstractPonyModel mobModel;
protected PlayerModel playerModel;
public RenderPonyMob(RenderManager renderManager, PlayerModel playerModel) {

View file

@ -3,7 +3,7 @@ package com.brohoof.minelittlepony.renderer;
import com.brohoof.minelittlepony.MineLittlePony;
import com.brohoof.minelittlepony.Pony;
import com.brohoof.minelittlepony.model.PMAPI;
import com.brohoof.minelittlepony.model.ModelVillagerPony;
import com.brohoof.minelittlepony.model.pony.ModelVillagerPony;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderManager;

View file

@ -8,7 +8,7 @@ import org.lwjgl.opengl.GL14;
import com.brohoof.minelittlepony.PonySize;
import com.brohoof.minelittlepony.model.PMAPI;
import com.brohoof.minelittlepony.model.PlayerModel;
import com.brohoof.minelittlepony.model.pony.pm_newPonyAdv;
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
import com.brohoof.minelittlepony.renderer.IRenderPony;
import net.minecraft.client.Minecraft;
@ -51,7 +51,7 @@ public class LayerHeldPonyItem implements LayerRenderer {
if (!pony.getModel().isSleeping) {
if (pony.getModel().metadata.getRace().hasHorn() && pony.getModel().metadata.getGlowColor() != 0) {
pm_newPonyAdv model = (pm_newPonyAdv) pony.getModel();
ModelPlayerPony model = (ModelPlayerPony) pony.getModel();
if (pony.getModel().aimedBow) {
renderDrop(pony, entity, model.unicornarm, 1.0F, 0.15F, 0.9375F, 0.0625F);
} else if (pony.getModel().metadata.getSize() == PonySize.FOAL) {

View file

@ -5,10 +5,10 @@ import java.util.Map;
import com.brohoof.minelittlepony.MineLittlePony;
import com.brohoof.minelittlepony.forge.IPonyArmor;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.model.PlayerModel;
import com.brohoof.minelittlepony.model.pony.pm_Human;
import com.brohoof.minelittlepony.model.pony.armor.pm_newPonyArmor;
import com.brohoof.minelittlepony.model.pony.ModelHumanPlayer;
import com.brohoof.minelittlepony.model.pony.armor.ModelPonyArmor;
import com.brohoof.minelittlepony.renderer.IRenderPony;
import com.google.common.collect.Maps;
@ -45,7 +45,7 @@ public class LayerPonyArmor implements LayerRenderer {
public void doRenderLayer(EntityLivingBase entity, float p_177141_2_, float p_177141_3_, float ticks, float p_177141_5_, float p_177141_6_,
float p_177141_7_, float scale) {
pony = ((IRenderPony) renderer).getPony();
if (pony.getModel() instanceof pm_Human) {
if (pony.getModel() instanceof ModelHumanPlayer) {
humanArmor.doRenderLayer(entity, p_177141_2_, p_177141_3_, ticks, p_177141_5_, p_177141_6_, p_177141_7_, scale);
} else {
for (int i = 4; i > 0; i--) {
@ -62,11 +62,11 @@ public class LayerPonyArmor implements LayerRenderer {
ItemArmor itemarmor = (ItemArmor) itemstack.getItem();
boolean isLegs = armorSlot == 2;
ModelPony modelbase = isLegs ? pony.getArmor().modelArmor : pony.getArmor().modelArmorChestplate;
AbstractPonyModel modelbase = isLegs ? pony.getArmor().modelArmor : pony.getArmor().modelArmorChestplate;
modelbase.setModelAttributes(this.pony.getModel());
modelbase.setLivingAnimations(entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks);
modelbase = getArmorModel(entitylivingbaseIn, itemstack, armorSlot, modelbase);
prepareToRender((pm_newPonyArmor) modelbase, armorSlot);
prepareToRender((ModelPonyArmor) modelbase, armorSlot);
this.renderer.bindTexture(getArmorTexture(entitylivingbaseIn, itemstack, isLegs ? 2 : 1, null));
if (itemarmor.getArmorMaterial() == ArmorMaterial.LEATHER) {
@ -110,7 +110,7 @@ public class LayerPonyArmor implements LayerRenderer {
}
}
private void prepareToRender(pm_newPonyArmor model, int slot) {
private void prepareToRender(ModelPonyArmor model, int slot) {
model.setInvisible(false);
switch (slot) {
@ -223,12 +223,12 @@ public class LayerPonyArmor implements LayerRenderer {
return def;
}
private static ModelPony getArmorModel(EntityLivingBase entity, ItemStack itemstack, int slot, ModelPony def) {
private static AbstractPonyModel getArmorModel(EntityLivingBase entity, ItemStack itemstack, int slot, AbstractPonyModel def) {
IPonyArmor armor = MineLittlePony.getProxy().getPonyArmors();
if (armor != null) {
ModelBase model = armor.getArmorModel(entity, itemstack, slot, def);
if (model instanceof pm_newPonyArmor) {
return (ModelPony) model;
if (model instanceof ModelPonyArmor) {
return (AbstractPonyModel) model;
}
}
return def;

View file

@ -51,7 +51,7 @@ public class LayerPonyCape implements LayerRenderer {
if (model.getModel().isSneak && !model.getModel().isFlying) {
translate(0.0F, 0.03F, 0.0F);
}
} else if (model.getModel().metadata.getSize() == PonySize.PRINCESS) {
} else if (model.getModel().metadata.getSize() == PonySize.TALL) {
translate(0.0F, -0.09F, 0.0F);
scale(1.0F, 1.0F, 1.0F);
if (model.getModel().isSneak && !model.getModel().isFlying) {

View file

@ -3,9 +3,9 @@ package com.brohoof.minelittlepony.renderer.layer;
import static net.minecraft.client.renderer.GlStateManager.*;
import com.brohoof.minelittlepony.PonySize;
import com.brohoof.minelittlepony.model.ModelPony;
import com.brohoof.minelittlepony.model.AbstractPonyModel;
import com.brohoof.minelittlepony.model.PlayerModel;
import com.brohoof.minelittlepony.model.pony.pm_newPonyAdv;
import com.brohoof.minelittlepony.model.pony.ModelPlayerPony;
import com.brohoof.minelittlepony.renderer.IRenderPony;
import com.mojang.authlib.GameProfile;
@ -39,7 +39,7 @@ public class LayerPonySkull implements LayerRenderer {
float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) {
ItemStack itemstack = entity.getCurrentArmor(3);
if (itemstack != null && itemstack.getItem() != null) {
ModelPony model = getModel().getModel();
AbstractPonyModel model = getModel().getModel();
Item item = itemstack.getItem();
pushMatrix();
@ -48,21 +48,21 @@ public class LayerPonySkull implements LayerRenderer {
if (!isVillager && entity.isChild()) {
scale(0.7, 0.7, 0.7);
}
if (model instanceof pm_newPonyAdv) {
if (model instanceof ModelPlayerPony) {
if (model.metadata.getSize() == PonySize.FOAL) {
translate(0.0F, 0.76F, 0.0F);
scale(0.9, 0.9, 0.9);
}
}
model.bipedHead.postRender(0.0625f);
if (model instanceof pm_newPonyAdv) {
if (model instanceof ModelPlayerPony) {
translate(0, .2, 0);
}
color(1, 1, 1, 1);
if (item instanceof ItemBlock) {
renderBlock(entity, itemstack);
} else if (item == Items.skull) {
if (model instanceof pm_newPonyAdv) {
if (model instanceof ModelPlayerPony) {
translate(0, 0, -.15);
}
renderSkull(itemstack, isVillager);