From 6c607e20828f97f950038dfb86891a74afb6f755 Mon Sep 17 00:00:00 2001 From: Yaman Qalieh Date: Wed, 13 May 2020 07:57:05 -0400 Subject: [PATCH] Allow placing auto-rotating nodes on other nodes in on_rightclick (#9859) --- builtin/common/misc_helpers.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index 715f89bc4..1a0c71efd 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -290,7 +290,8 @@ if INIT == "game" then return end local undef = core.registered_nodes[unode.name] - if undef and undef.on_rightclick then + local sneaking = placer and placer:get_player_control().sneak + if undef and undef.on_rightclick and not sneaking then return undef.on_rightclick(pointed_thing.under, unode, placer, itemstack, pointed_thing) end -- 2.25.1