aboutsummaryrefslogtreecommitdiff
path: root/features/waypoints
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-07-29 20:02:32 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-07-29 20:02:32 +0800
commita44692e33414897ba10e00274988205503fd63b6 (patch)
treed937349a0b3d01353e879a793301b2bb4abc3fa4 /features/waypoints
parent54e533661a391fa0bf6a072696f49e54ab7b6bc7 (diff)
downloadSoopyV2-a44692e33414897ba10e00274988205503fd63b6.tar.gz
SoopyV2-a44692e33414897ba10e00274988205503fd63b6.tar.bz2
SoopyV2-a44692e33414897ba10e00274988205503fd63b6.zip
+ fix mine waypoints
+ add load all button in friends gui (i got too lazy to add more stuff)
Diffstat (limited to 'features/waypoints')
-rw-r--r--features/waypoints/index.js5
-rw-r--r--features/waypoints/minewaypoints_socket.js1
2 files changed, 3 insertions, 3 deletions
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,