diff --git a/minehost.lua b/minehost.lua index d629a88..3344c30 100644 --- a/minehost.lua +++ b/minehost.lua @@ -101,8 +101,8 @@ local function handleMessage(sender, type, data) if type == LOG then print("[" .. sender .. "]: " .. data["log"] .. ": " .. (data["content"]["n"] >= 1 and tostring(data["content"][1]) or "")) if data["log"] == STATUS then - print("Relative position: " .. textutils.serializeJSON(data["content"][1]["relative_position"]["coordinates"])) - print("Position: " .. (data["content"][1]["position"]["coordinates"] and textutils.serialiseJSON(data["content"][1]["position"]["coordinates"]) or "not positioned.")) + print("Relative position: " .. textutils.serializeJSON(data["content"][1]["relative_position"])) + print("Position: " .. (data["content"][1]["position"]["coordinates"] and textutils.serialiseJSON(data["content"][1]["position"]) or "not positioned.")) print("fuel: " .. tostring(data["content"][1]["fuel"])) print("current task: " .. data["content"][1]["task"]) end diff --git a/mineleader.lua b/mineleader.lua index da42c51..f5a99b2 100644 --- a/mineleader.lua +++ b/mineleader.lua @@ -274,6 +274,7 @@ local function determineHeading() end heading = fDelta rightAxis = position - oldPos + sendLog(HEADING, "Heading obtained. \nForward: " .. heading .. "\nRight direction: " .. rightAxis) end local function moveBy(delta, forward, right)