Fix client side placement issue on blocks with GUIs. Closes #3399
This commit is contained in:
parent
85a2a2e661
commit
96ef9b564b
|
@ -120,14 +120,14 @@
|
|||
IBlockState iblockstate = p_187099_2_.func_180495_p(p_187099_3_);
|
||||
+ boolean bypass = true;
|
||||
+ for (ItemStack s : new ItemStack[]{p_187099_1_.func_184614_ca(), p_187099_1_.func_184592_cb()}) //TODO: Expand to more hands? player.inv.getHands()?
|
||||
+ bypass = bypass && (s == null || s.func_77973_b().doesSneakBypassUse(s, p_187099_2_, p_187099_3_, p_187099_1_));
|
||||
+ bypass = bypass && (s.func_190926_b() || s.func_77973_b().doesSneakBypassUse(s, p_187099_2_, p_187099_3_, p_187099_1_));
|
||||
|
||||
- if ((!p_187099_1_.func_70093_af() || p_187099_1_.func_184614_ca().func_190926_b() && p_187099_1_.func_184592_cb().func_190926_b()) && iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_3_, iblockstate, p_187099_1_, p_187099_6_, p_187099_4_, f, f1, f2))
|
||||
+ if ((!p_187099_1_.func_70093_af() || bypass || event.getUseBlock() == net.minecraftforge.fml.common.eventhandler.Event.Result.ALLOW))
|
||||
{
|
||||
- flag = true;
|
||||
+ if (event.getUseBlock() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY)
|
||||
+ flag = p_187099_1_.func_184614_ca().func_190926_b() && p_187099_1_.func_184592_cb().func_190926_b() && iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_3_, iblockstate, p_187099_1_, p_187099_6_, p_187099_4_, f, f1, f2);
|
||||
+ flag = iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_3_, iblockstate, p_187099_1_, p_187099_6_, p_187099_4_, f, f1, f2);
|
||||
+ if (flag) result = EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue