mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 16:41:06 +01:00
Add new supported_node_facedir
group and apply it to item frames (#4291)
This change should fix item frames not placing on chests and similar blocks Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4291 Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land> Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com> Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
This commit is contained in:
parent
54957e6191
commit
68e5c19df4
2 changed files with 12 additions and 1 deletions
|
@ -94,5 +94,16 @@ function minetest.check_single_for_falling(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if get_item_group(node.name, "supported_node_facedir") ~= 0 then
|
||||||
|
local dir = facedir_to_dir(node.param2)
|
||||||
|
if dir then
|
||||||
|
local def = registered_nodes[get_node(vector.add(pos, dir)).name]
|
||||||
|
if def and def.drawtype == "airlike" then
|
||||||
|
drop_attached_node(pos)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
|
@ -638,7 +638,7 @@ function mcl_itemframes.create_base_definitions()
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = { dig_immediate = 3, deco_block = 1, dig_by_piston = 1, container = 1, attached_node_facedir = 1 },
|
groups = { dig_immediate = 3, deco_block = 1, dig_by_piston = 1, container = 1, supported_node_facedir = 1 },
|
||||||
sounds = mcl_sounds.node_sound_defaults(),
|
sounds = mcl_sounds.node_sound_defaults(),
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue