RenderEntityItem, RenderPlayer, RendererLivingEntity, LayerArmorBase, ItemStack rejects fixed; changed Armor Layer hook to catch LayerBipedArmor only.
This commit is contained in:
parent
632c190e6f
commit
9deb54b75f
|
@ -1,5 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java
|
||||
@@ -42,7 +42,7 @@
|
||||
boolean flag = p_177077_9_.isGui3d();
|
||||
int i = this.func_177078_a(itemstack);
|
||||
float f = 0.25F;
|
||||
- float f1 = MathHelper.sin(((float)p_177077_1_.getAge() + p_177077_8_) / 10.0F + p_177077_1_.hoverStart) * 0.1F + 0.1F;
|
||||
+ float f1 = shouldBob() ? MathHelper.sin(((float)p_177077_1_.getAge() + p_177077_8_) / 10.0F + p_177077_1_.hoverStart) * 0.1F + 0.1F : 0;
|
||||
float f2 = p_177077_9_.getItemCameraTransforms().func_181688_b(ItemCameraTransforms.TransformType.GROUND).scale.y;
|
||||
GlStateManager.translate((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_);
|
||||
|
||||
@@ -158,4 +158,25 @@
|
||||
{
|
||||
return TextureMap.locationBlocksTexture;
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
|
||||
@@ -62,6 +62,7 @@
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
public void doRender(AbstractClientPlayer entity, double x, double y, double z, float p_76986_8_, float partialTicks)
|
||||
{
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(entity, this, partialTicks, x, y, z))) return;
|
||||
if (!entity.isUser() || this.renderManager.livingPlayer == entity)
|
||||
{
|
||||
double d0 = y;
|
||||
@@ -62,6 +63,7 @@
|
||||
this.func_177137_d(entity);
|
||||
super.doRender(entity, x, d0, z, p_76986_8_, partialTicks);
|
||||
}
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Post(p_180596_1_, this, p_180596_9_, p_180596_2_, p_180596_4_, p_180596_6_));
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Post(entity, this, partialTicks, x, y, z));
|
||||
}
|
||||
|
||||
private void func_177137_d(AbstractClientPlayer p_177137_1_)
|
||||
|
|
|
@ -26,11 +26,24 @@
|
|||
}
|
||||
|
||||
protected boolean func_177088_c(T p_177088_1_)
|
||||
@@ -519,6 +524,7 @@
|
||||
@@ -470,10 +475,11 @@
|
||||
|
||||
public void renderName(T entity, double x, double y, double z)
|
||||
{
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Specials.Pre(entity, this, x, y, z))) return;
|
||||
if (this.canRenderName(entity))
|
||||
{
|
||||
double d0 = entity.getDistanceSqToEntity(this.renderManager.livingPlayer);
|
||||
- float f = entity.isSneaking() ? 32.0F : 64.0F;
|
||||
+ float f = entity.isSneaking() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;
|
||||
|
||||
if (d0 < (double)(f * f))
|
||||
{
|
||||
@@ -519,6 +525,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Specials.Post(p_77033_1_, this, p_77033_2_, p_77033_4_, p_77033_6_));
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Specials.Post(entity, this, x, y, z));
|
||||
}
|
||||
|
||||
protected boolean canRenderName(T entity)
|
||||
|
|
|
@ -1,5 +1,44 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java
|
||||
@@ -56,28 +56,28 @@
|
||||
T t = this.func_177175_a(p_177182_9_);
|
||||
t.setModelAttributes(this.field_177190_a.getMainModel());
|
||||
t.setLivingAnimations(p_177182_1_, p_177182_2_, p_177182_3_, p_177182_4_);
|
||||
+ t = getArmorModelHook(p_177182_1_, itemstack, p_177182_9_, t);
|
||||
this.func_177179_a(t, p_177182_9_);
|
||||
boolean flag = this.func_177180_b(p_177182_9_);
|
||||
this.field_177190_a.bindTexture(this.getArmorResource(itemarmor, flag));
|
||||
|
||||
- switch (itemarmor.getArmorMaterial())
|
||||
- {
|
||||
- case LEATHER:
|
||||
int i = itemarmor.getColor(itemstack);
|
||||
+ {
|
||||
+ if (i != -1) // Allow this for anything, not only cloth.
|
||||
+ {
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
GlStateManager.color(this.field_177184_f * f, this.field_177185_g * f1, this.field_177192_h * f2, this.field_177187_e);
|
||||
t.render(p_177182_1_, p_177182_2_, p_177182_3_, p_177182_5_, p_177182_6_, p_177182_7_, p_177182_8_);
|
||||
- this.field_177190_a.bindTexture(this.getArmorResource(itemarmor, flag, "overlay"));
|
||||
- case CHAIN:
|
||||
- case IRON:
|
||||
- case GOLD:
|
||||
- case DIAMOND:
|
||||
+ this.field_177190_a.bindTexture(this.getArmorResource(p_177182_1_, itemstack, flag ? 2 : 1, "overlay"));
|
||||
+ }
|
||||
+ else // Non-colored
|
||||
+ {
|
||||
GlStateManager.color(this.field_177184_f, this.field_177185_g, this.field_177192_h, this.field_177187_e);
|
||||
t.render(p_177182_1_, p_177182_2_, p_177182_3_, p_177182_5_, p_177182_6_, p_177182_7_, p_177182_8_);
|
||||
- default:
|
||||
-
|
||||
+ }
|
||||
+ // Default
|
||||
if (!this.field_177193_i && itemstack.isItemEnchanted())
|
||||
{
|
||||
this.func_177183_a(p_177182_1_, t, p_177182_2_, p_177182_3_, p_177182_4_, p_177182_5_, p_177182_6_, p_177182_7_, p_177182_8_);
|
||||
@@ -136,11 +136,13 @@
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
|
@ -14,3 +53,53 @@
|
|||
private ResourceLocation getArmorResource(ItemArmor p_177178_1_, boolean p_177178_2_, String p_177178_3_)
|
||||
{
|
||||
String s = String.format("textures/models/armor/%s_layer_%d%s.png", new Object[] {p_177178_1_.getArmorMaterial().getName(), Integer.valueOf(p_177178_2_ ? 2 : 1), p_177178_3_ == null ? "" : String.format("_%s", new Object[]{p_177178_3_})});
|
||||
@@ -158,4 +160,49 @@
|
||||
protected abstract void func_177177_a();
|
||||
|
||||
protected abstract void func_177179_a(T p_177179_1_, int p_177179_2_);
|
||||
+
|
||||
+ /*=================================== FORGE START =========================================*/
|
||||
+
|
||||
+ /**
|
||||
+ * Hook to allow item-sensitive armor model. for LayerBipedArmor.
|
||||
+ */
|
||||
+ protected T getArmorModelHook(EntityLivingBase entity, ItemStack itemStack, int slot, T model)
|
||||
+ {
|
||||
+ return model;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * More generic ForgeHook version of the above function, it allows for Items to have more control over what texture they provide.
|
||||
+ *
|
||||
+ * @param entity Entity wearing the armor
|
||||
+ * @param stack ItemStack for the armor
|
||||
+ * @param slot Slot ID that the item is in
|
||||
+ * @param type Subtype, can be null or "overlay"
|
||||
+ * @return ResourceLocation pointing at the armor's texture
|
||||
+ */
|
||||
+ public ResourceLocation getArmorResource(net.minecraft.entity.Entity entity, ItemStack stack, int slot, String type)
|
||||
+ {
|
||||
+ ItemArmor item = (ItemArmor)stack.getItem();
|
||||
+ String texture = item.getArmorMaterial().getName();
|
||||
+ String domain = "minecraft";
|
||||
+ int idx = texture.indexOf(':');
|
||||
+ if (idx != -1)
|
||||
+ {
|
||||
+ domain = texture.substring(0, idx);
|
||||
+ texture = texture.substring(idx + 1);
|
||||
+ }
|
||||
+ String s1 = String.format("%s:textures/models/armor/%s_layer_%d%s.png", domain, texture, (slot == 2 ? 2 : 1), type == null ? "" : String.format("_%s", type));
|
||||
+
|
||||
+ s1 = net.minecraftforge.client.ForgeHooksClient.getArmorTexture(entity, stack, s1, slot, type);
|
||||
+ ResourceLocation resourcelocation = (ResourceLocation)field_177191_j.get(s1);
|
||||
+
|
||||
+ if (resourcelocation == null)
|
||||
+ {
|
||||
+ resourcelocation = new ResourceLocation(s1);
|
||||
+ field_177191_j.put(s1, resourcelocation);
|
||||
+ }
|
||||
+
|
||||
+ return resourcelocation;
|
||||
+ }
|
||||
+ /*=================================== FORGE END ===========================================*/
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/layers/LayerBipedArmor.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/layers/LayerBipedArmor.java
|
||||
@@ -51,4 +51,10 @@
|
||||
{
|
||||
p_177194_1_.setInvisible(false);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ protected ModelBiped getArmorModelHook(net.minecraft.entity.EntityLivingBase entity, net.minecraft.item.ItemStack itemStack, int slot, ModelBiped model)
|
||||
+ {
|
||||
+ return net.minecraftforge.client.ForgeHooksClient.getArmorModel(entity, itemStack, slot, model);
|
||||
+ }
|
||||
}
|
|
@ -71,7 +71,7 @@
|
|||
+ /**
|
||||
+ * ItemStack sensitive version of getItemAttributeModifiers
|
||||
+ */
|
||||
+ public Multimap getAttributeModifiers(ItemStack stack)
|
||||
+ public Multimap<String, AttributeModifier> getAttributeModifiers(ItemStack stack)
|
||||
+ {
|
||||
+ return this.getItemAttributeModifiers();
|
||||
+ }
|
||||
|
|
|
@ -121,7 +121,24 @@
|
|||
}
|
||||
|
||||
public boolean interactWithEntity(EntityPlayer playerIn, EntityLivingBase entityIn)
|
||||
@@ -861,6 +858,7 @@
|
||||
@@ -743,6 +740,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onItemTooltip(this, playerIn, list, advanced);
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -853,7 +851,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- multimap = this.getItem().getItemAttributeModifiers();
|
||||
+ multimap = this.getItem().getAttributeModifiers(this);
|
||||
}
|
||||
|
||||
return multimap;
|
||||
@@ -861,6 +859,7 @@
|
||||
|
||||
public void setItem(Item newItem)
|
||||
{
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
boolean flag = p_177077_9_.isGui3d();
|
||||
int i = this.func_177078_a(itemstack);
|
||||
float f1 = 0.25F;
|
||||
- float f2 = MathHelper.sin(((float)p_177077_1_.getAge() + p_177077_8_) / 10.0F + p_177077_1_.hoverStart) * 0.1F + 0.1F;
|
||||
+ float f2 = shouldBob() ? MathHelper.sin(((float)p_177077_1_.getAge() + p_177077_8_) / 10.0F + p_177077_1_.hoverStart) * 0.1F + 0.1F : 0.0F;
|
||||
GlStateManager.translate((float)p_177077_2_, (float)p_177077_4_ + f2 + 0.25F, (float)p_177077_6_);
|
||||
float f3;
|
||||
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 2
|
||||
}
|
||||
else
|
||||
{
|
||||
+ // Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
|
||||
+ if (j > 0 && shouldSpreadItems())
|
||||
+ {
|
||||
+ float f2 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
|
||||
+ float f3 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
|
||||
+ float f4 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
|
||||
+ GlStateManager.translate(f2, f3, 0);
|
||||
+ }
|
||||
this.field_177080_a.renderItem(itemstack, ibakedmodel);
|
||||
GlStateManager.translate(0.0F, 0.0F, 0.046875F);
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,9 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
public void func_180596_a(AbstractClientPlayer p_180596_1_, double p_180596_2_, double p_180596_4_, double p_180596_6_, float p_180596_8_, float p_180596_9_)
|
||||
{
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(p_180596_1_, this, p_180596_9_, p_180596_2_, p_180596_4_, p_180596_6_))) return;
|
||||
if (!p_180596_1_.isUser() || this.renderManager.livingPlayer == p_180596_1_)
|
||||
{
|
||||
double d3 = p_180596_4_;
|
||||
++++ END PATCH
|
|
@ -1,14 +0,0 @@
|
|||
++++ REJECTED PATCH 4
|
||||
|
||||
public void passSpecialRender(EntityLivingBase p_77033_1_, double p_77033_2_, double p_77033_4_, double p_77033_6_)
|
||||
{
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Specials.Pre(p_77033_1_, this, p_77033_2_, p_77033_4_, p_77033_6_))) return;
|
||||
if (this.canRenderName(p_77033_1_))
|
||||
{
|
||||
double d3 = p_77033_1_.getDistanceSqToEntity(this.renderManager.livingPlayer);
|
||||
- float f = p_77033_1_.isSneaking() ? 32.0F : 64.0F;
|
||||
+ float f = p_77033_1_.isSneaking() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;
|
||||
|
||||
if (d3 < (double)(f * f))
|
||||
{
|
||||
++++ END PATCH
|
|
@ -1,88 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
ModelBase modelbase = this.func_177175_a(p_177182_9_);
|
||||
modelbase.setModelAttributes(this.field_177190_a.getMainModel());
|
||||
modelbase.setLivingAnimations(p_177182_1_, p_177182_2_, p_177182_3_, p_177182_4_);
|
||||
+ modelbase = net.minecraftforge.client.ForgeHooksClient.getArmorModel(p_177182_1_, itemstack, p_177182_9_, modelbase);
|
||||
this.func_177179_a(modelbase, p_177182_9_);
|
||||
boolean flag = this.func_177180_b(p_177182_9_);
|
||||
- this.field_177190_a.bindTexture(this.getArmorResource(itemarmor, flag));
|
||||
+ this.field_177190_a.bindTexture(this.getArmorResource(p_177182_1_, itemstack, flag ? 2 : 1, null));
|
||||
|
||||
- switch (LayerArmorBase.SwitchArmorMaterial.field_178747_a[itemarmor.getArmorMaterial().ordinal()])
|
||||
{
|
||||
- case 1:
|
||||
- int j = itemarmor.getColor(itemstack);
|
||||
+ int j = itemarmor.getColor(itemstack);
|
||||
+ if (j != -1) //Allow this for anything, not only cloth.
|
||||
+ {
|
||||
float f7 = (float)(j >> 16 & 255) / 255.0F;
|
||||
float f8 = (float)(j >> 8 & 255) / 255.0F;
|
||||
float f9 = (float)(j & 255) / 255.0F;
|
||||
GlStateManager.color(this.field_177184_f * f7, this.field_177185_g * f8, this.field_177192_h * f9, this.field_177187_e);
|
||||
modelbase.render(p_177182_1_, p_177182_2_, p_177182_3_, p_177182_5_, p_177182_6_, p_177182_7_, p_177182_8_);
|
||||
- this.field_177190_a.bindTexture(this.getArmorResource(itemarmor, flag, "overlay"));
|
||||
- case 2:
|
||||
- case 3:
|
||||
- case 4:
|
||||
- case 5:
|
||||
+ this.field_177190_a.bindTexture(this.getArmorResource(p_177182_1_, itemstack, flag ? 2 : 1, "overlay"));
|
||||
+ }
|
||||
+ { // Non-cloth
|
||||
GlStateManager.color(this.field_177184_f, this.field_177185_g, this.field_177192_h, this.field_177187_e);
|
||||
modelbase.render(p_177182_1_, p_177182_2_, p_177182_3_, p_177182_5_, p_177182_6_, p_177182_7_, p_177182_8_);
|
||||
- default:
|
||||
+ }
|
||||
+ { // Default, Why is this a switch? there were no breaks.
|
||||
if (!this.field_177193_i && itemstack.isItemEnchanted())
|
||||
{
|
||||
this.func_177183_a(p_177182_1_, modelbase, p_177182_2_, p_177182_3_, p_177182_4_, p_177182_5_, p_177182_6_, p_177182_7_, p_177182_8_);
|
||||
}
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
|
||||
protected abstract void func_177179_a(ModelBase p_177179_1_, int p_177179_2_);
|
||||
|
||||
+ /*=================================== FORGE START =========================================*/
|
||||
+ /**
|
||||
+ * More generic ForgeHook version of the above function, it allows for Items to have more control over what texture they provide.
|
||||
+ *
|
||||
+ * @param entity Entity wearing the armor
|
||||
+ * @param stack ItemStack for the armor
|
||||
+ * @param slot Slot ID that the item is in
|
||||
+ * @param type Subtype, can be null or "overlay"
|
||||
+ * @return ResourceLocation pointing at the armor's texture
|
||||
+ */
|
||||
+ public ResourceLocation getArmorResource(net.minecraft.entity.Entity entity, ItemStack stack, int slot, String type)
|
||||
+ {
|
||||
+ ItemArmor item = (ItemArmor)stack.getItem();
|
||||
+ String texture = ((ItemArmor)stack.getItem()).getArmorMaterial().getName();
|
||||
+ String domain = "minecraft";
|
||||
+ int idx = texture.indexOf(':');
|
||||
+ if (idx != -1)
|
||||
+ {
|
||||
+ domain = texture.substring(0, idx);
|
||||
+ texture = texture.substring(idx + 1);
|
||||
+ }
|
||||
+ String s1 = String.format("%s:textures/models/armor/%s_layer_%d%s.png", domain, texture, (slot == 2 ? 2 : 1), type == null ? "" : String.format("_%s", type));
|
||||
+
|
||||
+ s1 = net.minecraftforge.client.ForgeHooksClient.getArmorTexture(entity, stack, s1, slot, type);
|
||||
+ ResourceLocation resourcelocation = (ResourceLocation)field_177191_j.get(s1);
|
||||
+
|
||||
+ if (resourcelocation == null)
|
||||
+ {
|
||||
+ resourcelocation = new ResourceLocation(s1);
|
||||
+ field_177191_j.put(s1, resourcelocation);
|
||||
+ }
|
||||
+
|
||||
+ return resourcelocation;
|
||||
+ }
|
||||
+ /*=================================== FORGE END ===========================================*/
|
||||
+
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
static final class SwitchArmorMaterial
|
||||
++++ END PATCH
|
|
@ -1,20 +0,0 @@
|
|||
++++ REJECTED PATCH 10
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onItemTooltip(this, playerIn, arraylist, advanced);
|
||||
+
|
||||
return arraylist;
|
||||
}
|
||||
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 11
|
||||
}
|
||||
else
|
||||
{
|
||||
- object = this.getItem().getItemAttributeModifiers();
|
||||
+ object = this.getItem().getAttributeModifiers(this);
|
||||
}
|
||||
|
||||
return (Multimap)object;
|
||||
++++ END PATCH
|
|
@ -10,7 +10,6 @@ import java.nio.FloatBuffer;
|
|||
import java.util.Map;
|
||||
|
||||
import javax.vecmath.Matrix4f;
|
||||
import javax.vecmath.Vector3d;
|
||||
import javax.vecmath.Vector3f;
|
||||
import javax.vecmath.Vector4f;
|
||||
|
||||
|
@ -23,7 +22,7 @@ import net.minecraft.client.audio.SoundManager;
|
|||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiMainMenu;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
|
@ -32,7 +31,6 @@ import net.minecraft.client.renderer.WorldRenderer;
|
|||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemTransformVec3f;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
@ -91,6 +89,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
|
||||
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
public class ForgeHooksClient
|
||||
|
@ -326,10 +325,10 @@ public class ForgeHooksClient
|
|||
renderLayer.set(layer);
|
||||
}
|
||||
|
||||
public static ModelBase getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int slotID, ModelBase _default)
|
||||
public static ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int slotID, ModelBiped _default)
|
||||
{
|
||||
ModelBase modelbase = itemStack.getItem().getArmorModel(entityLiving, itemStack, slotID);
|
||||
return modelbase == null ? _default : modelbase;
|
||||
ModelBiped model = itemStack.getItem().getArmorModel(entityLiving, itemStack, slotID);
|
||||
return model == null ? _default : model;
|
||||
}
|
||||
|
||||
//This properly moves the domain, if provided, to the front of the string before concatenating
|
||||
|
|
Loading…
Reference in New Issue