diff options
author | Ninjune <enderknight537@gmail.com> | 2022-12-22 03:21:02 -0600 |
---|---|---|
committer | Ninjune <enderknight537@gmail.com> | 2022-12-22 03:21:02 -0600 |
commit | 329dccf50ed5e9f87531580f679522238b6a019b (patch) | |
tree | 3053852d322db744822a7dd2a05fd59d2b1e90b7 /commands/drawLine.js | |
parent | 1ffc0a89be42fcde95a04a87cc00dbc347b27ece (diff) | |
download | coleweight-329dccf50ed5e9f87531580f679522238b6a019b.tar.gz coleweight-329dccf50ed5e9f87531580f679522238b6a019b.tar.bz2 coleweight-329dccf50ed5e9f87531580f679522238b6a019b.zip |
v1.8.3
Diffstat (limited to 'commands/drawLine.js')
-rw-r--r-- | commands/drawLine.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/commands/drawLine.js b/commands/drawLine.js new file mode 100644 index 0000000..7fd9742 --- /dev/null +++ b/commands/drawLine.js @@ -0,0 +1,42 @@ +import constants from "../util/constants" +import { trace } from "../util/renderUtil" +const PREFIX = constants.PREFIX + +let x = 0, + y = 0, + z = 0 + +export function drawLine(args) +{ + switch(args.length - 1) + { + case 0: + case 1: + x = 0 + y = 0 + z = 0 + ChatLib.chat(`${PREFIX}&bStopped drawing line.`) + return + case 2: + x = args[1] + y = Player.getY() + 1 + z = args[2] + break + case 3: + x = args[1] + y = args[2] + z = args[3] + break + default: + ChatLib.chat(constants.INVALIDARGS) + return + } + ChatLib.chat(`${PREFIX}&bNow drawing line to &a${x} ${Math.round(y)} ${z}`) +} + + +register("renderWorld", () => { + if(x == 0 && y == 0 && z == 0) return + + trace(x, y, z, 0, 0, 1, 0.86) +})
\ No newline at end of file |