Allow placing auto-rotating nodes on other nodes in on_rightclick (#9859)

This commit is contained in:
Yaman Qalieh 2020-05-13 07:57:05 -04:00 committed by GitHub
parent 4e997e9d04
commit 6c607e2082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -290,7 +290,8 @@ if INIT == "game" then
return return
end end
local undef = core.registered_nodes[unode.name] 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, return undef.on_rightclick(pointed_thing.under, unode, placer,
itemstack, pointed_thing) itemstack, pointed_thing)
end end