diff --git a/mineleader.lua b/mineleader.lua index b02bdfc..45d39e6 100644 --- a/mineleader.lua +++ b/mineleader.lua @@ -366,7 +366,7 @@ local function moveBy(delta, forward, right) end local function moveTo(dest) - dest = vector.new(tonumber(string.format("%.0f", dest.x)), tonumber(string.format("%.0f", dest.y)), tonumber(string.format("%.0f", dest.z))) + dest = vector.new(math.floor(dest.x), math.floor(dest.y), math.floor(dest.z)) sendLog(MOVETO, "Attempting to move by (" .. dest.x .. "," .. dest.y .. "," .. dest.z .. ") (x,y,z).") if position == nil or heading == nil then sendLog(FAILED, "Position or heading is invalid.")