Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear(...)
- assert(commands, "Require Command Computer")
- local arg = {...}
- local b, result = false, {}
- for i=1,#arg,3 do
- assert(
- arg[i] and arg[i+1] and arg[i+2],
- string.format(
- "Missing coordinate: clear(%s, %s, %s)",
- arg[i] and arg[i] or "<x>",
- arg[i+1] and arg[i+1] or "<y>",
- arg[i+2] and arg[i+2] or "<z>"
- )
- )
- local r
- b, r = commands.blockdata(arg[i], arg[i+1], arg[i+2], "{Items:[{}]}")
- table.insert(result, unpack(r))
- if not b then
- return false, #result > 0 and result or nil
- end
- end
- return b, #result > 0 and result or nil
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement