From a44692e33414897ba10e00274988205503fd63b6 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Fri, 29 Jul 2022 20:02:32 +0800 Subject: + fix mine waypoints + add load all button in friends gui (i got too lazy to add more stuff) --- features/waypoints/index.js | 5 +++-- features/waypoints/minewaypoints_socket.js | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'features/waypoints') diff --git a/features/waypoints/index.js b/features/waypoints/index.js index 0760354..2bc4e09 100644 --- a/features/waypoints/index.js +++ b/features/waypoints/index.js @@ -161,7 +161,7 @@ class Waypoints extends Feature { this.locations[area || loc[0].area] = loc; } let lastLoc = [0, 0, 0] - let lastTp = 0 + this.lastTp = 0 this.registerEvent("tick", () => { try { if (Scoreboard.getLines().length < 2) return; @@ -176,9 +176,10 @@ class Waypoints extends Feature { minewaypoints_socket.setServer(server, World.getWorld().func_82737_E()) let loc = [Player.getX(), Player.getY(), Player.getZ()] - if (calculateDistanceQuick(lastLoc, loc) > 25) { + if (calculateDistanceQuick(lastLoc, loc) > 20 ** 2) { this.lastTp = Date.now() } + lastLoc = loc if (Date.now() - this.lastSend > 1000 && Date.now() - this.lastTp > 5000) { Scoreboard.getLines().forEach(line => { diff --git a/features/waypoints/minewaypoints_socket.js b/features/waypoints/minewaypoints_socket.js index 3a6dcd7..0cc31e5 100644 --- a/features/waypoints/minewaypoints_socket.js +++ b/features/waypoints/minewaypoints_socket.js @@ -37,7 +37,6 @@ class MineWayPointsServer extends WebsiteCommunicator { this.lastSend = Date.now() this.hypixelServer = server - this.sendData({ type: "setServer", server: server, -- cgit