mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 12:42:26 +00:00
Fix block placement not checking for player collision
This commit is contained in:
1 parent
af4fcd73a4
commit
3870951a37
1 file changed
+4
-2
@@ -899,14 +899,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2948,6 +3168,7 @@
|
||||
@@ -2948,7 +3168,8 @@
|
||||
IBlockState iblockstate1 = this.func_180495_p(p_190527_2_);
|
||||
AxisAlignedBB axisalignedbb = p_190527_3_ ? null : p_190527_1_.func_176223_P().func_185890_d(this, p_190527_2_);
|
||||
|
||||
- if (axisalignedbb != Block.field_185506_k && !this.func_72917_a(axisalignedbb.func_186670_a(p_190527_2_), p_190527_5_))
|
||||
+ if (!((p_190527_5_ instanceof EntityPlayer) || !net.minecraftforge.event.ForgeEventFactory.onBlockPlace(p_190527_5_, new net.minecraftforge.common.util.BlockSnapshot(this, p_190527_2_, p_190527_1_.func_176223_P()), p_190527_4_).isCanceled())) return false;
|
||||
if (axisalignedbb != Block.field_185506_k && !this.func_72917_a(axisalignedbb.func_186670_a(p_190527_2_), p_190527_5_))
|
||||
+ if (axisalignedbb != Block.field_185506_k && !this.func_72855_b(axisalignedbb.func_186670_a(p_190527_2_))) // Forge: Remove second parameter, we patch placer to be non-null, passing it here skips collision checks for the placer
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -2958,7 +3179,7 @@
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user