1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-09-29 23:40:46 +00:00

Fix NPE when turtles interact with an entity

Closes #531
This commit is contained in:
SquidDev 2020-08-27 17:17:03 +01:00
parent 7809a2eddd
commit 2c67849b35

View File

@ -246,7 +246,7 @@ public class TurtlePlaceCommand implements ITurtleCommand
{ {
// See EntityPlayer.interactOn // See EntityPlayer.interactOn
cancelResult = ForgeHooks.onInteractEntity( turtlePlayer, hitEntity, Hand.MAIN_HAND ); cancelResult = ForgeHooks.onInteractEntity( turtlePlayer, hitEntity, Hand.MAIN_HAND );
if( cancelResult.isSuccessOrConsume() ) if( cancelResult != null && cancelResult.isSuccessOrConsume() )
{ {
placed = true; placed = true;
} }