]> git.lizzy.rs Git - Crafter.git/commitdiff
Simplify redstone check
authoroilboi <47129783+oilboi@users.noreply.github.com>
Sun, 28 Jun 2020 06:12:21 +0000 (02:12 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Sun, 28 Jun 2020 06:12:21 +0000 (02:12 -0400)
mods/redstone/init.lua

index f4e3e5238586fd89ef50283c20be121f785cb973..45ed90febfbee6ce0df13ec6f372da0ee6516195 100644 (file)
@@ -93,14 +93,11 @@ local function create_boundary_box(pos)
                                                        if not table_3d[x] then table_3d[x] = {} end
                                                        if not table_3d[x][y] then table_3d[x][y] = {} end
 
-                                                       if x == pos.x-9 or x == pos.x+9 or 
+                                                       if (x == pos.x-9 or x == pos.x+9 or 
                                                        y == pos.y-9 or y == pos.y+9 or 
-                                                       z == pos.z-9 or z == pos.z+9 then
-                                                               if temp_pool.dust then
-                                                                       table_3d[x][y][z] = {torch=temp_pool.dust}
-                                                               else
-                                                                       table_3d[x][y][z] = temp_pool
-                                                               end
+                                                       z == pos.z-9 or z == pos.z+9) and 
+                                                       temp_pool.dust and temp_pool.dust > 1 then
+                                                               table_3d[x][y][z] = {torch=temp_pool.dust}
                                                        else
                                                                if temp_pool.dust then
                                                                        table_3d[x][y][z] = {dust=0,origin=temp_pool.dust}