diff options
author | Ninjune x <enderknight537@gmail.com> | 2023-01-08 02:12:14 -0600 |
---|---|---|
committer | Ninjune x <enderknight537@gmail.com> | 2023-01-08 02:12:14 -0600 |
commit | 688e13930681bca7881d19468745f7067e9bc5c2 (patch) | |
tree | 9e95e59359dd2ae6e2e7761666b99a191bb62a1f /commands/drawLine.js | |
parent | 1891ada92ab1911cfaaa7ad0e72c85573f4fcbb6 (diff) | |
download | coleweight-future.tar.gz coleweight-future.tar.bz2 coleweight-future.zip |
v1.8.6future
Diffstat (limited to 'commands/drawLine.js')
-rw-r--r-- | commands/drawLine.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/commands/drawLine.js b/commands/drawLine.js new file mode 100644 index 0000000..1374dea --- /dev/null +++ b/commands/drawLine.js @@ -0,0 +1,43 @@ +import constants from "../util/constants" +import { trace, drawEspBox } 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) + drawEspBox(x, y, z, 0, 0, 1, 0.86) // y no work +})
\ No newline at end of file |