Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local T
- local function checkFuelNeeded(quantity)
- local fuelNeeded = quantity - turtle.getFuelLevel() -- eg 600
- if fuelNeeded > 0 then
- T:checkInventoryForItem({"minecraft:lava_bucket", "coal", "planks"}, {1, math.ceil(fuelNeeded / 60), math.ceil(fuelNeeded / 15)}) -- 0 if not present
- T:refuel(quantity, true)
- end
- end
- local function getSupplies()
- T:clear()
- -- add items you need here
- -- example of a specific item, quantity = 1, required = true
- T:checkInventoryForItem({"minecraft:chest"}, {1}, true)
- -- example of a non-specific item, quantity = 16, required = false
- T:checkInventoryForItem({"stairs"}, {16}, false)
- -- example of alternative items quantity = 64, required = true
- T:checkInventoryForItem({"minecraft:cobblestone", "minecraft:dirt"}, {64, 64}, true)
- end
- local function newProcess()
- checkFuelNeeded(250) -- put approx amount your process will need here
- getSupplies() -- get the items you need here
- -- now do the job!
- end
- function main()
- T = require("lib.clsTurtle"):new(true) -- true enables logfile to log.txt
- newProcess() -- the name of your epic process, eg createCobbleGenerator()
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement