diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 0a4aea29a..b6c0956cd 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -1033,3 +1033,13 @@ function mcl_util.get_palette_indexes_from_pos(pos) return palette_indexes end end + +function mcl_util.get_colorwallmounted_rotation(pos) + local colorwallmounted_node = minetest.get_node(pos) + for i = 0, 32, 1 do + local colorwallmounted_rotation = colorwallmounted_node.param2 - (i * 8) + if colorwallmounted_rotation < 6 then + return colorwallmounted_rotation + end + end +end