diff options
author | ubq323 <ubq323@ubq323.website> | 2024-04-04 02:18:31 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-04-04 02:18:31 +0100 |
commit | 535ba14ccee1dae506ee411c1ce1f1c303bb94e6 (patch) | |
tree | 39e36fdb468afa65741f6942ba017d2c9e46e02c | |
parent | 5eef718a10b3fef1e18f860e83375ad4c6ec7648 (diff) |
launch cactus
-rw-r--r-- | cactus.lua | 47 |
1 files changed, 25 insertions, 22 deletions
@@ -118,16 +118,17 @@ local function dump_and_refuel() for i=1,16 do ch.pullItems(self, i) end - if turtle.getFuelLevel() < 10000 then + while turtle.getFuelLevel() < 2000 then for k,v in pairs(ch.list()) do if v.name == "minecraft:lava_bucket" then ch.pushItems(self, k, 1, 1) turtle.select(1) turtle.refuel() ch.pullItems(self, 1) - break + goto nextfuel end end + ::nextfuel:: end end @@ -139,26 +140,28 @@ local function mainloop() dump_and_refuel() - -- repeat - -- repeat - -- do_column() - -- move_linear(1) - -- until POS.z == -1826 - -- do_column() - -- turn_right() - -- move_linear(1) - -- turn_right() - - -- repeat - -- do_column() - -- move_linear(1) - -- until POS.z == datum.z - -- do_column() - -- turn_left() - -- move_linear(1) - -- turn_left() - - -- until POS.x <= -29 + repeat + repeat + do_column() + move_linear(1) + until POS.z == -1826 + do_column() + turn_right() + move_linear(1) + turn_right() + + repeat + do_column() + move_linear(1) + until POS.z == datum.z + do_column() + turn_left() + move_linear(1) + turn_left() + + until POS.x <= -29 + + os.sleep(120) end mainloop() |