PathFinder
Managing the drawing of paths
isEnabled()
isEnabled()
Returns:
(boolean) Return status of enabling.
Example Usage:
-- Example code showing how to use the function
local isEnabled = modules.pathFinder.isEnabled()
setEnabled(enable)
setEnabled(enable)
Parameters:
enable
(boolean).
Returns:
(boolean) Return (true) if successfully.
Example Usage:
-- Example code showing how to use the function
modules.pathFinder.setEnabled(true)
isHasPath(id)
isHasPath(id)
Parameters:
id
(string)
Returns:
(boolean) Return (true) if has.
Example Usage:
-- Example code showing how to use the function
local isHasCustom = modules.pathFinder.isHasPath("Custom") -- Custom used for /path command
removePath(id)
removePath(id)
Parameters:
id
(string)
Returns:
(boolean) Return true.
Example Usage:
-- Example code showing how to use the function
local status = modules.pathFinder.removePath("Custom")
addOrUpdatePath(path)
addOrUpdatePath(path)
Parameters:
path
(table)
Returns:
(boolean) Return true.
Example Usage:
-- Example code showing how to use the function
local path = {
x = 0,
y = 0,
z = 0,
red = 255,
green = 0,
blue = 0,
alpha = 140,
id = "Custom",
end_text = "Lua Path"
}
local status = modules.pathFinder.addOrUpdatePath(path)
getPathBlocks(id)
getPathBlocks(id)
Parameters:
id
(string)
Returns:
(table) Return list of blockpos.
Example Usage:
-- Example code showing how to use the function
local blocks = modules.pathFinder.getPathBlocks("Custom")
for index, block in ipairs(blocks) do
if block ~= nil then
local x = block.x
local y = block.y
local z = block.z
end
end
Last updated