Overlay patch fix: use the correct block position.
This commit is contained in:
parent
b77b036459
commit
7258d577cd
1 changed files with 18 additions and 4 deletions
|
@ -9,15 +9,29 @@
|
|||
{
|
||||
this.func_178097_a(abstractclientplayer, f2, f, f1);
|
||||
}
|
||||
@@ -384,6 +384,7 @@
|
||||
@@ -366,6 +366,7 @@
|
||||
if (this.mc.thePlayer.isEntityInsideOpaqueBlock())
|
||||
{
|
||||
IBlockState iblockstate = this.mc.theWorld.getBlockState(new BlockPos(this.mc.thePlayer));
|
||||
+ BlockPos overlayPos = new BlockPos(this.mc.thePlayer);
|
||||
EntityPlayer entityplayer = this.mc.thePlayer;
|
||||
|
||||
for (int i = 0; i < 8; ++i)
|
||||
@@ -379,11 +380,13 @@
|
||||
if (iblockstate1.getBlock().isVisuallyOpaque())
|
||||
{
|
||||
iblockstate = iblockstate1;
|
||||
+ overlayPos = blockpos;
|
||||
}
|
||||
}
|
||||
|
||||
if (iblockstate.getBlock().getRenderType() != -1)
|
||||
{
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(mc.thePlayer, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, iblockstate, new BlockPos(this.mc.thePlayer)))
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(mc.thePlayer, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, iblockstate, overlayPos))
|
||||
this.func_178108_a(p_78447_1_, this.mc.getBlockRendererDispatcher().getBlockModelShapes().getTexture(iblockstate));
|
||||
}
|
||||
}
|
||||
@@ -392,11 +393,13 @@
|
||||
@@ -392,11 +395,13 @@
|
||||
{
|
||||
if (this.mc.thePlayer.isInsideOfMaterial(Material.water))
|
||||
{
|
||||
|
@ -31,7 +45,7 @@
|
|||
this.renderFireInFirstPerson(p_78447_1_);
|
||||
}
|
||||
}
|
||||
@@ -513,6 +516,12 @@
|
||||
@@ -513,6 +518,12 @@
|
||||
{
|
||||
if (!this.itemToRender.getIsItemStackEqual(itemstack))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue