diff options
author | Ninjune <enderknight537@gmail.com> | 2022-11-23 11:50:54 -0600 |
---|---|---|
committer | Ninjune <enderknight537@gmail.com> | 2022-11-23 11:50:54 -0600 |
commit | 9bb7bf0b2f4dbc9269b0e5fa446d8480b814fe20 (patch) | |
tree | 56837d423243990da63152d0e9c119189f1d121b /commands/yog.js | |
parent | 5e76b8b00ac668768f5295ac4b2cb7c79c71ee36 (diff) | |
download | coleweight-9bb7bf0b2f4dbc9269b0e5fa446d8480b814fe20.tar.gz coleweight-9bb7bf0b2f4dbc9269b0e5fa446d8480b814fe20.tar.bz2 coleweight-9bb7bf0b2f4dbc9269b0e5fa446d8480b814fe20.zip |
v1.6.4 forgot to push lmao
Diffstat (limited to 'commands/yog.js')
-rw-r--r-- | commands/yog.js | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/commands/yog.js b/commands/yog.js new file mode 100644 index 0000000..15a3d9b --- /dev/null +++ b/commands/yog.js @@ -0,0 +1,63 @@ +import constants from "../util/constants" + +const PREFIX = constants.PREFIX +let yogWaypoints = [] + +export function yog(arg2) +{ + const WAYPOINTNAME = "Yog" + + if(arg2 != "toggle") + { + new TextComponent(`${PREFIX}&bGo to the leftmost corner of the topaz crystal facing bal close to bal then do /cw yog toggle.`) + .chat() + } + else + { + if(yogWaypoints[0] == undefined) + { + let startPos = [Player.getX(), Player.getY(), Player.getZ()], + x = startPos[0], + y = startPos[1], + z = startPos[2] + + console.log(x + " " + y + " " + z) + yogWaypoints.push([x + 10, y - 7, z - 27]) + yogWaypoints.push([x + 10, y - 7, z - 27]) + yogWaypoints.push([x + 28, y - 8, z + 15]) + yogWaypoints.push([x - 41, y - 3, z + 26]) + yogWaypoints.push([x - 32, y - 3, z + 45]) + yogWaypoints.push([x - 22, y - 3, z - 34]) + yogWaypoints.push([x + 28, y - 8, z + 36]) + yogWaypoints.push([x - 47, y - 3, z + 32]) + yogWaypoints.push([x - 43, y - 1, z + 4]) + yogWaypoints.push([x - 47, y + 2, z - 20]) + yogWaypoints.push([x + 11, y - 13, z + 40]) + yogWaypoints.push([x + 15, y - 13, z + 43]) + yogWaypoints.push([x - 44, y + 2, z - 29]) + yogWaypoints.push([x + 33, y - 4, z - 15]) + yogWaypoints.push([x - 6, y - 4, z - 34]) + yogWaypoints.push([x + 19, y - 12, z + 35]) + yogWaypoints.push([x + 16, y - 9, z - 15]) + ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned on!`) + } + else + { + yogWaypoints = [] + ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned off!`) + } + } +} + +register("renderWorld", () => { + if(yogWaypoints.length < 1) return + yogWaypoints.forEach((waypoint) => { + Tessellator.drawString(Math.floor((Math.abs(parseInt(Player.getX()) - waypoint[0]) + Math.abs(parseInt(Player.getY()) - waypoint[1]) + Math.abs(parseInt(Player.getZ()) - waypoint[2]))/3) + "m", waypoint[0], waypoint[1], waypoint[2]) + }) +}) + +register("worldLoad", () => { + yogWaypoints = [] +}) + +export default ""
\ No newline at end of file |