]> git.lizzy.rs Git - Crafter.git/commitdiff
Make redstone do "y corrners" (diagonal facedir binary)
authoroilboi <47129783+oilboi@users.noreply.github.com>
Fri, 26 Jun 2020 14:13:28 +0000 (10:13 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Fri, 26 Jun 2020 14:13:28 +0000 (10:13 -0400)
mods/redstone/init.lua

index 3d2cd435f21e99a7a2ba78f43253ef74d39ff68f..fbc25a9944dcd08ff3b9d32f48251a6302273900 100644 (file)
@@ -27,10 +27,19 @@ local add_vec         = vector.add
 local sub_vec         = vector.subtract
 local vector_distance = vector.distance
 
+--this is written out manually so that
+--math.abs is not needed
 local order = {
        {x=1, y=0, z=0}, {x=-1, y=0, z= 0},
-       {x=0, y=1, z=0}, {x= 0, y=-1, z=0},
        {x=0, y=0, z=1}, {x= 0, y=0, z=-1},
+
+       {x=0, y=1, z=0}, {x= 0, y=-1, z=0},
+
+       {x=1, y=1, z=0}, {x=-1, y=1, z= 0},
+       {x=0, y=1, z=1}, {x= 0, y=1, z=-1},
+
+       {x=1, y=-1, z=0}, {x=-1, y=-1, z= 0},
+       {x=0, y=-1, z=1}, {x= 0, y=-1, z=-1},
 }
 
 -- redstone class
@@ -222,7 +231,7 @@ function redstone.collect_info(pos)
        end
        localredstone.injector(pos,pos)
        localredstone.collector(pos,pos)
-       
+
        redstone_algorithm()
 end