This commit is contained in:
Lizzy Fleckenstein 2021-03-18 12:38:54 +01:00
parent 6ac0d628ef
commit 0e206e9974
1 changed files with 8 additions and 0 deletions

View File

@ -191,6 +191,14 @@ minetest.register_craftitem("mcl_paintings:painting", {
if pointed_thing.type ~= "node" then if pointed_thing.type ~= "node" then
return itemstack return itemstack
end end
local node = minetest.get_node(pointed_thing.under)
if placer and not placer:get_player_control().sneak then
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
end
end
local dir = vector.subtract(pointed_thing.above, pointed_thing.under) local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
dir = vector.normalize(dir) dir = vector.normalize(dir)
if dir.y ~= 0 then if dir.y ~= 0 then