We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20405ed commit b12bdccCopy full SHA for b12bdcc
builtin/game/item.lua
@@ -139,6 +139,19 @@ function core.dir_to_wallmounted(dir)
139
end
140
141
142
+function core.wallmounted_to_dir(wallmounted)
143
+ -- table of dirs in wallmounted order
144
+ return ({[0] = {x = 0, y = 1, z = 0},
145
+ {x = 0, y = -1, z = 0},
146
+ {x = 1, y = 0, z = 0},
147
+ {x = -1, y = 0, z = 0},
148
+ {x = 0, y = 0, z = 1},
149
+ {x = 0, y = 0, z = -1}})
150
+
151
+ --indexed into by the wallmounted in question
152
+ [wallmounted]
153
+end
154
155
function core.get_node_drops(nodename, toolname)
156
local drop = ItemStack({name=nodename}):get_definition().drop
157
if drop == nil then
0 commit comments