From 4bb1fad63dd5e14ce120cfb94c2f13a64e400553 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 30 Mar 2017 04:25:16 +0200 Subject: [PATCH] Allow to place doors at usable nodes with sneak-click --- mods/ITEMS/mcl_doors/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_doors/init.lua b/mods/ITEMS/mcl_doors/init.lua index f90507a7..915da6d9 100644 --- a/mods/ITEMS/mcl_doors/init.lua +++ b/mods/ITEMS/mcl_doors/init.lua @@ -81,7 +81,8 @@ function mcl_doors:register_door(name, def) end local ptu = pointed_thing.under local nu = minetest.get_node(ptu) - if minetest.registered_nodes[nu.name].on_rightclick then + -- Pointed thing's rightclick action takes precedence, unless player holds down the sneak key + if minetest.registered_nodes[nu.name].on_rightclick and not placer:get_player_control().sneak then return minetest.registered_nodes[nu.name].on_rightclick(ptu, nu, placer, itemstack) end