73 lines
3.7 KiB
Diff
73 lines
3.7 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java
|
|
@@ -32,6 +32,9 @@
|
|
protected List<LayerRenderer<T>> field_177097_h = Lists.<LayerRenderer<T>>newArrayList();
|
|
protected boolean field_188323_j;
|
|
|
|
+ public static float NAME_TAG_RANGE = 64.0f;
|
|
+ public static float NAME_TAG_RANGE_SNEAK = 32.0f;
|
|
+
|
|
public RenderLivingBase(RenderManager p_i46156_1_, ModelBase p_i46156_2_, float p_i46156_3_)
|
|
{
|
|
super(p_i46156_1_);
|
|
@@ -72,10 +75,12 @@
|
|
|
|
public void func_76986_a(T p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
|
{
|
|
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Pre<T>(p_76986_1_, this, p_76986_9_, p_76986_2_, p_76986_4_, p_76986_6_))) return;
|
|
GlStateManager.func_179094_E();
|
|
GlStateManager.func_179129_p();
|
|
this.field_77045_g.field_78095_p = this.func_77040_d(p_76986_1_, p_76986_9_);
|
|
- this.field_77045_g.field_78093_q = p_76986_1_.func_184218_aH();
|
|
+ boolean shouldSit = p_76986_1_.func_184218_aH() && (p_76986_1_.func_184187_bx() != null && p_76986_1_.func_184187_bx().shouldRiderSit());
|
|
+ this.field_77045_g.field_78093_q = shouldSit;
|
|
this.field_77045_g.field_78091_s = p_76986_1_.func_70631_g_();
|
|
|
|
try
|
|
@@ -84,7 +89,7 @@
|
|
float f1 = this.func_77034_a(p_76986_1_.field_70758_at, p_76986_1_.field_70759_as, p_76986_9_);
|
|
float f2 = f1 - f;
|
|
|
|
- if (p_76986_1_.func_184218_aH() && p_76986_1_.func_184187_bx() instanceof EntityLivingBase)
|
|
+ if (shouldSit && p_76986_1_.func_184187_bx() instanceof EntityLivingBase)
|
|
{
|
|
EntityLivingBase entitylivingbase = (EntityLivingBase)p_76986_1_.func_184187_bx();
|
|
f = this.func_77034_a(entitylivingbase.field_70760_ar, entitylivingbase.field_70761_aq, p_76986_9_);
|
|
@@ -133,6 +138,7 @@
|
|
{
|
|
f5 = 1.0F;
|
|
}
|
|
+ f2 = f1 - f; // Forge: Fix MC-1207
|
|
}
|
|
|
|
GlStateManager.func_179141_d();
|
|
@@ -194,6 +200,7 @@
|
|
GlStateManager.func_179089_o();
|
|
GlStateManager.func_179121_F();
|
|
super.func_76986_a(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
|
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Post<T>(p_76986_1_, this, p_76986_9_, p_76986_2_, p_76986_4_, p_76986_6_));
|
|
}
|
|
|
|
public float func_188322_c(T p_188322_1_, float p_188322_2_)
|
|
@@ -454,10 +461,11 @@
|
|
|
|
public void func_177067_a(T p_177067_1_, double p_177067_2_, double p_177067_4_, double p_177067_6_)
|
|
{
|
|
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Specials.Pre<T>(p_177067_1_, this, p_177067_2_, p_177067_4_, p_177067_6_))) return;
|
|
if (this.func_177070_b(p_177067_1_))
|
|
{
|
|
double d0 = p_177067_1_.func_70068_e(this.field_76990_c.field_78734_h);
|
|
- float f = p_177067_1_.func_70093_af() ? 32.0F : 64.0F;
|
|
+ float f = p_177067_1_.func_70093_af() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;
|
|
|
|
if (d0 < (double)(f * f))
|
|
{
|
|
@@ -466,6 +474,7 @@
|
|
this.func_188296_a(p_177067_1_, p_177067_2_, p_177067_4_, p_177067_6_, s, d0);
|
|
}
|
|
}
|
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Specials.Post<T>(p_177067_1_, this, p_177067_2_, p_177067_4_, p_177067_6_));
|
|
}
|
|
|
|
protected boolean func_177070_b(T p_177070_1_)
|