diff --git a/src/main/java/com/minelittlepony/render/layer/AbstractPonyLayer.java b/src/main/java/com/minelittlepony/render/layer/AbstractPonyLayer.java index 43d3b875..bea43202 100644 --- a/src/main/java/com/minelittlepony/render/layer/AbstractPonyLayer.java +++ b/src/main/java/com/minelittlepony/render/layer/AbstractPonyLayer.java @@ -17,8 +17,7 @@ public abstract class AbstractPonyLayer implements L this.layer = humanLayer; } - public final void doRenderLayer(T entity, float limbSwing, float limbSwingAmount, float ticks, float ageInTicks, - float netHeadYaw, float headPitch, float scale) { + public final void doRenderLayer(T entity, float limbSwing, float limbSwingAmount, float ticks, float ageInTicks, float netHeadYaw, float headPitch, float scale) { ModelBase model = renderer.getMainModel(); if (model instanceof ModelHumanPlayer) { // render the human layer diff --git a/src/main/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java b/src/main/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java index 87ce609f..31dc7c08 100644 --- a/src/main/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java +++ b/src/main/java/com/minelittlepony/render/layer/LayerEntityOnPonyShoulder.java @@ -30,11 +30,10 @@ public class LayerEntityOnPonyShoulder extends AbstractPonyLayer { this.rm = rm; } - public void doPonyRender(EntityPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, - float ageInTicks, float netHeadYaw, float headPitch, float scale) { + public void doPonyRender(EntityPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) { GlStateManager.enableRescaleNormal(); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.color(1, 1, 1, 1); NBTTagCompound leftTag = player.getLeftShoulderEntity(); @@ -71,9 +70,7 @@ public class LayerEntityOnPonyShoulder extends AbstractPonyLayer { model.transform(BodyPart.BODY); // render on the haunches - float f = .25F; - float f1 = left ? 0.25F : -0.25F; - GlStateManager.translate(f1, f, 0.35F); + GlStateManager.translate(left ? 0.25F : -0.25F, 0.25F, 0.35F); GlStateManager.scale(1, -1, -1); GlStateManager.rotate(5 * (left ? -1 : 1), 0, 0, 1); diff --git a/src/main/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java b/src/main/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java index 9d13d904..ff975fc6 100644 --- a/src/main/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java +++ b/src/main/java/com/minelittlepony/render/layer/LayerHeldPonyItem.java @@ -33,12 +33,13 @@ public class LayerHeldPonyItem extends AbstractPonyLayer { } @Override - public void doPonyRender(EntityLivingBase entity, float p_177141_2_, float p_177141_3_, - float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) { + public void doPonyRender(EntityLivingBase entity, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) { ModelBase model = getRenderer().getMainModel(); boolean mainRight = entity.getPrimaryHand() == EnumHandSide.RIGHT; + ItemStack itemMain = entity.getHeldItemMainhand(); ItemStack itemOff = entity.getHeldItemOffhand(); + ItemStack left = mainRight ? itemOff : itemMain; ItemStack right = mainRight ? itemMain : itemOff; @@ -70,14 +71,14 @@ public class LayerHeldPonyItem extends AbstractPonyLayer { GlStateManager.translate(0.0F, 0.2F, 0.0F); } - GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F); - GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(-90.0F, 1, 0, 0); + GlStateManager.rotate(180.0F, 0, 1, 0); boolean isUnicorn = isUnicorn(this.getRenderer().getMainModel()); boolean isLeft = hand == EnumHandSide.LEFT; if (isUnicorn) { - GlStateManager.translate(isLeft ? -0.6F : 0.1F, 1, -.5); + GlStateManager.translate(isLeft ? -0.6F : 0.1F, 1, -0.5F); } else { - GlStateManager.translate(0.0425F, 0.125F, -1.00F); + GlStateManager.translate(0.0425F, 0.125F, -1); } Minecraft.getMinecraft().getItemRenderer().renderItemSide(entity, drop, transform, isLeft); diff --git a/src/main/java/com/minelittlepony/render/layer/LayerPonyArmor.java b/src/main/java/com/minelittlepony/render/layer/LayerPonyArmor.java index 22dbcba4..a3670daf 100644 --- a/src/main/java/com/minelittlepony/render/layer/LayerPonyArmor.java +++ b/src/main/java/com/minelittlepony/render/layer/LayerPonyArmor.java @@ -163,9 +163,9 @@ public class LayerPonyArmor extends AbstractPonyLayer { } } - private void renderEnchantment(EntityLivingBase entitylivingbaseIn, ModelBase modelbaseIn, float p_177183_3_, float p_177183_4_, float p_177183_5_, + private void renderEnchantment(EntityLivingBase entity, ModelBase model, float p_177183_3_, float p_177183_4_, float p_177183_5_, float p_177183_6_, float p_177183_7_, float p_177183_8_, float p_177183_9_) { - float f7 = entitylivingbaseIn.ticksExisted + p_177183_5_; + float f7 = entity.ticksExisted + p_177183_5_; this.getRenderer().bindTexture(ENCHANTED_ITEM_GLINT_RES); GlStateManager.enableBlend(); GlStateManager.depthFunc(514); @@ -185,7 +185,7 @@ public class LayerPonyArmor extends AbstractPonyLayer { GlStateManager.rotate(30.0F - i * 60.0F, 0.0F, 0.0F, 1.0F); GlStateManager.translate(0.0F, f7 * (0.001F + i * 0.003F) * 20.0F, 0.0F); GlStateManager.matrixMode(5888); - modelbaseIn.render(entitylivingbaseIn, p_177183_3_, p_177183_4_, p_177183_6_, p_177183_7_, p_177183_8_, p_177183_9_); + model.render(entity, p_177183_3_, p_177183_4_, p_177183_6_, p_177183_7_, p_177183_8_, p_177183_9_); } GlStateManager.matrixMode(5890); diff --git a/src/main/java/com/minelittlepony/render/plane/Face.java b/src/main/java/com/minelittlepony/render/plane/Face.java index 1c466452..199e9c0e 100644 --- a/src/main/java/com/minelittlepony/render/plane/Face.java +++ b/src/main/java/com/minelittlepony/render/plane/Face.java @@ -2,6 +2,6 @@ package com.minelittlepony.render.plane; enum Face { NORTH, SOUTH, - UP, DOWN, - EAST, WEST; + UP, DOWN, + EAST, WEST; } \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/render/player/RenderPonyBase.java b/src/main/java/com/minelittlepony/render/player/RenderPonyBase.java index 1048c957..9188ccb9 100644 --- a/src/main/java/com/minelittlepony/render/player/RenderPonyBase.java +++ b/src/main/java/com/minelittlepony/render/player/RenderPonyBase.java @@ -73,8 +73,6 @@ public abstract class RenderPonyBase extends RenderPlayer implements IRenderPony super.doRender(player, x, y, z, entityYaw, partialTicks); } - - // TODO: Why are there two sets of arms? @Override public void renderRightArm(AbstractClientPlayer player) { updateModel(player); diff --git a/src/main/java/com/minelittlepony/render/ponies/RenderPonyIllusionIllager.java b/src/main/java/com/minelittlepony/render/ponies/RenderPonyIllusionIllager.java index 8c45e138..0c9dff2d 100644 --- a/src/main/java/com/minelittlepony/render/ponies/RenderPonyIllusionIllager.java +++ b/src/main/java/com/minelittlepony/render/ponies/RenderPonyIllusionIllager.java @@ -54,14 +54,14 @@ public class RenderPonyIllusionIllager extends RenderPonyMob