]> git.lizzy.rs Git - Crafter.git/blob - mods/redstone/functions.lua
Turn off nametags as they break the animation
[Crafter.git] / mods / redstone / functions.lua
1 --this converts a vector into absolute value
2 function vector.abs(v)
3         return {
4                 x = math.abs(v.x),
5                 y = math.abs(v.y),
6                 z = math.abs(v.z)
7         }
8 end
9
10 --add a power signal to the position (i) that doesn't actually exist
11 redstone.inject_power_signal = function(i)
12         if not r_index[i.x] then r_index[i.x] = {} end
13         if not r_index[i.x][i.y] then r_index[i.x][i.y] = {} end
14         r_index[i.x][i.y][i.z] = {torch = true,power=9}
15 end