68 lines
3.6 KiB
Diff
68 lines
3.6 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/renderer/ItemRenderer.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
|
|
@@ -317,7 +317,7 @@
|
|
{
|
|
ItemStack itemstack = abstractclientplayer.func_184607_cu();
|
|
|
|
- if (itemstack.func_77973_b() == Items.field_151031_f)
|
|
+ if (itemstack != null && itemstack.func_77973_b() == Items.field_151031_f) //Forge: Data watcher can desync and cause this to NPE...
|
|
{
|
|
EnumHand enumhand1 = abstractclientplayer.func_184600_cs();
|
|
flag = enumhand1 == EnumHand.MAIN_HAND;
|
|
@@ -361,7 +361,7 @@
|
|
this.func_187456_a(p_187457_7_, p_187457_5_, enumhandside);
|
|
}
|
|
}
|
|
- else if (p_187457_6_.func_77973_b() == Items.field_151098_aY)
|
|
+ else if (p_187457_6_.func_77973_b() instanceof net.minecraft.item.ItemMap)
|
|
{
|
|
if (flag && this.field_187468_e == null)
|
|
{
|
|
@@ -445,6 +445,7 @@
|
|
if (this.field_78455_a.field_71439_g.func_70094_T())
|
|
{
|
|
IBlockState iblockstate = this.field_78455_a.field_71441_e.func_180495_p(new BlockPos(this.field_78455_a.field_71439_g));
|
|
+ BlockPos overlayPos = new BlockPos(this.field_78455_a.field_71439_g);
|
|
EntityPlayer entityplayer = this.field_78455_a.field_71439_g;
|
|
|
|
for (int i = 0; i < 8; ++i)
|
|
@@ -458,11 +459,13 @@
|
|
if (iblockstate1.func_177230_c().func_176214_u())
|
|
{
|
|
iblockstate = iblockstate1;
|
|
+ overlayPos = blockpos;
|
|
}
|
|
}
|
|
|
|
if (iblockstate.func_185901_i() != EnumBlockRenderType.INVISIBLE)
|
|
{
|
|
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(field_78455_a.field_71439_g, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, iblockstate, overlayPos))
|
|
this.func_178108_a(p_78447_1_, this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(iblockstate));
|
|
}
|
|
}
|
|
@@ -471,11 +474,13 @@
|
|
{
|
|
if (this.field_78455_a.field_71439_g.func_70055_a(Material.field_151586_h))
|
|
{
|
|
+ if (!net.minecraftforge.event.ForgeEventFactory.renderWaterOverlay(field_78455_a.field_71439_g, p_78447_1_))
|
|
this.func_78448_c(p_78447_1_);
|
|
}
|
|
|
|
if (this.field_78455_a.field_71439_g.func_70027_ad())
|
|
{
|
|
+ if (!net.minecraftforge.event.ForgeEventFactory.renderFireOverlay(field_78455_a.field_71439_g, p_78447_1_))
|
|
this.func_78442_d(p_78447_1_);
|
|
}
|
|
}
|
|
@@ -597,8 +602,8 @@
|
|
else
|
|
{
|
|
float f = entityplayersp.func_184825_o(1.0F);
|
|
- this.field_187469_f += MathHelper.func_76131_a((Objects.equal(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
|
|
- this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equal(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
|
|
+ this.field_187469_f += MathHelper.func_76131_a((!net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, entityplayersp.field_71071_by.field_70461_c) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
|
|
+ this.field_187471_h += MathHelper.func_76131_a((float)(!net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
|
|
}
|
|
|
|
if (this.field_187469_f < 0.1F)
|