mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
Fix crash when cycling tool ability while looking fully up or down in a ladder
This commit is contained in:
parent
b5779cfda0
commit
19851f636c
@ -569,7 +569,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
|
||||
EntityPlayerMP playerMP = (EntityPlayerMP) player;
|
||||
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(playerMP, playerMP.theItemInWorldManager.getBlockReachDistance());
|
||||
|
||||
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
if(mop != null && mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
// this is horrifying and won't always produce the correct results, but it beats not having anything
|
||||
// simply put, we check if we are aiming at a block, and if we do, we compare that block's onBlockActivated
|
||||
// method to the one from Block.class. If the declaring class doesn't match, it's overridden, and we
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user