-- download at MT.QZX.COM (refill-jakab-ore-spawners.lua) if not a then a="E" -- tunnel direction: N S E W t="spawners_ores:stone_with_gold_spawner" -- spawner type f="default:gold_ingot" -- spawner fuel -- DON'T TOUCH ANYTHING BELOW HERE m = 1 ; t_active = string.concat({t, "_active"}) ; fs = string.len(f)+2 as={["N"]=0,["W"]=90,["S"]=180,["E"]=270} ; turn.angle(as[a]) for i = 1,5 do local item = check_inventory.up("", "main", i) if not take.up(item) then break end end else local function get_count(side) local i = check_inventory[side]("", "fuel", 1) if i == "" or i == nil then return 99 end local c = string.sub(i, fs) if c == "" or c == nil then c = 1 end return 99 - tonumber(c) end if m == 0 then local node = read_node.down() if node == t or node == t_active then local c = get_count("down") if c > 0 then if not insert.down(string.concat({f, " ", c}), "fuel") then insert.down(f, "fuel") end end end if not check_inventory.self(f, "main") then self.remove() end m = 1 elseif m == 1 then local node = read_node.forward_down() if node ~= "air" then move.forward() m = 0 else self.remove() end end end