This commit is contained in:
Julian Brammer 2024-06-06 22:55:29 +02:00
parent cf65f27f76
commit 494c9e6d6a

View File

@ -1,8 +1,17 @@
-- https://tweaked.cc/guide/gps_setup.html
-- Seems to not work with optifine
local x = 0
local y = 0
local z = 0
basic = require("lib.basic")
shell.run("gps", "host", x, y, z)
if fs.exists "/brulijam/config/gps.config" then
gpsConfig = basic.readFileAll("/brulijam/config/gps.config")
gpsConfig = textutils.unserialize(gpsConfig)
else
gpsConfig = {}
gpsConfig["posX"] = 0
gpsConfig["posY"] = 0
gpsConfig["posZ"] = 0
basic.writeToFile("/brulijam/config/gps.config", textutils.serialize(gpsConfig))
end
shell.run("gps", "host", gpsConfig["posX"], gpsConfig["posY"], gpsConfig["posZ"])