This commit is contained in:
Julian Brammer 2024-06-05 21:17:47 +02:00
parent c5f32b2a1b
commit 1ff70b2d9a
2 changed files with 46 additions and 19 deletions

View File

@ -0,0 +1,8 @@
-- https://tweaked.cc/guide/gps_setup.html
-- Seems to not work with optifine
local x = 0
local y = 0
local z = 0
shell.run("gps", "host", x, y, z)

View File

@ -7,8 +7,8 @@ oreList = {
[3] = "minecraft:deepslate_iron_ore",
[4] = "minecraft:coal_ore",
[5] = "minecraft:deepslate_coal_ore",
[6] = "minecraft:lapisOre",
[7] = "minecraft:deepslate_lapisOre",
[6] = "minecraft:lapis_ore",
[7] = "minecraft:deepslate_lapis_ore",
[8] = "minecraft:diamond_ore",
[9] = "minecraft:deepslate_diamond_ore",
[10] = "minecraft:redstone_ore",
@ -17,24 +17,26 @@ oreList = {
[13] = "minecraft:deepslate_emerald_ore",
[14] = "minecraft:quartz_ore",
[15] = "minecraft:deepslate_quartz_ore",
[16] = "minecraft:copper_ore",
[17] = "minecraft:deepslate_copper_ore",
[18] = "minecraft:ancient_debris",
[16] = "minecraft:nether_gold_ore",
[17] = "minecraft:copper_ore",
[18] = "minecraft:deepslate_copper_ore",
[19] = "minecraft:ancient_debris",
}
keepList = {
[0] = "minecraft:chest",
[1] = "minecraft:raw_gold",
[2] = "minecraft:raw_iron",
[3] = "minecraft:coal",
[4] = "minecraft:lapis_lazuli",
[5] = "minecraft:diamond",
[6] = "minecraft:redstone",
[7] = "minecraft:emerald",
[8] = "minecraft:quartz",
[9] = "minecraft:gold_nugget",
[10] = "minecraft:raw_copper",
[11] = "minecraft:ancient_debris",
[0] = "computercraft:wireless_modem_advanced"
[1] = "minecraft:chest",
[2] = "minecraft:raw_gold",
[3] = "minecraft:raw_iron",
[4] = "minecraft:coal",
[5] = "minecraft:lapis_lazuli",
[6] = "minecraft:diamond",
[7] = "minecraft:redstone",
[8] = "minecraft:emerald",
[9] = "minecraft:quartz",
[10] = "minecraft:gold_nugget",
[11] = "minecraft:raw_copper",
[12] = "minecraft:ancient_debris",
}
@ -63,6 +65,23 @@ local function getState()
end
local function savePositionToFile()
--swap modem with Pickaxe
--by convention the chunkloader is always left, so that Tools are right
for i=1, 16 do
turtle.select(i)
itemDetail = turtle.getItemDetail()
if itemDetail ~= nil then
if itemDetail.name == "computercraft:wireless_modem_advanced" then
turtle.equipRight()
pos = gps.locate()
basic.appendToFile_nl("/brulijam/files/chests-turtle-miner-fibo.txt", textutils.serialize(pos))
end
end
end
end
local function clearInventory()
for i=1, 16 do
@ -112,7 +131,7 @@ local function storeItems()
turtle.up()
basic.secureDigUp()
turtle.placeUp()
--TODO save in list, where chest is placed
savePositionToFile()
chestAvailable = true
break
elseif i == 16 then
@ -211,8 +230,8 @@ local function mineRow()
recursiveOreMining()
turtle.up()
checkInventory()
clearInventory()
checkInventory()
--save path progress
state["dataCurrentPathProgress"] = i+1