Add nil checks for placer

This commit is contained in:
DTA7
2017-10-01 15:41:58 +02:00
committed by sfan5
parent ca3e807d35
commit 0216fa08ec
14 changed files with 72 additions and 53 deletions

View File

@ -69,7 +69,8 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
-- Call on_rightclick if the pointed node defines it
if ndef and ndef.on_rightclick and
user and not user:get_player_control().sneak then
not (user and user:is_player() and
user:get_player_control().sneak) then
return ndef.on_rightclick(
pointed_thing.under,
node, user,