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

master
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
1 changed files with 2 additions and 1 deletions

View File

@ -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