aboutsummaryrefslogtreecommitdiff
path: root/features/events
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-03 16:44:29 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-03 16:44:29 +0800
commitd7dd016c1f4e4732dae6f4eb718fefa24462704b (patch)
tree0327c15068261ec223e2a49f4575defad5980074 /features/events
parentbe90cd09f07e8cd2112812036b1f6eb4942eb0b4 (diff)
downloadSoopyV2-d7dd016c1f4e4732dae6f4eb718fefa24462704b.tar.gz
SoopyV2-d7dd016c1f4e4732dae6f4eb718fefa24462704b.tar.bz2
SoopyV2-d7dd016c1f4e4732dae6f4eb718fefa24462704b.zip
add waypoints
Diffstat (limited to 'features/events')
-rw-r--r--features/events/index.js30
1 files changed, 11 insertions, 19 deletions
diff --git a/features/events/index.js b/features/events/index.js
index 664b675..cc2c3e5 100644
--- a/features/events/index.js
+++ b/features/events/index.js
@@ -2,7 +2,7 @@
/// <reference lib="es2015" />
import Feature from "../../featureClass/class";
import { f } from "../../../mappings/mappings";
-import { drawBoxAtBlock, drawBoxAtBlockNotVisThruWalls, drawLine } from "../../utils/renderUtils";
+import { drawBoxAtBlock, drawBoxAtBlockNotVisThruWalls, drawCoolWaypoint, drawLine } from "../../utils/renderUtils";
import { calculateDistance, calculateDistanceQuick, fastestPathThrough } from "../../utils/utils";
import HudTextElement from "../hud/HudTextElement";
import LocationSetting from "../settings/settingThings/location";
@@ -101,24 +101,16 @@ class Events extends Feature {
if(loc.lastPing && Date.now()-loc.lastPing < 500){
blue = true
}
- drawBoxAtBlock(loc.x, loc.y,loc.z,0,blue?100:255,blue?255:0)
- }
- if(loc.fromApi){
- Tessellator.drawString(
- "(" + (loc.chain+1) + "/4) " + typeReplace[loc.type] + " BURRIAL (" + Math.round(calculateDistance([Player.getX(),Player.getY(),Player.getZ()],[loc.x+0.5,loc.y+2.5,loc.z+0.5])) + "m)",
- loc.x+0.5,
- loc.y+1.5,
- loc.z+0.5,
- loc.clicked? 65280:(loc.nearest?16711680:6579300), true, loc.clicked? 0.04:(loc.nearest?1:0.5), !loc.clicked
- );
- }else{
- Tessellator.drawString(
- typeReplace[loc.type] + " BURRIAL (" + Math.round(calculateDistance([Player.getX(),Player.getY(),Player.getZ()],[loc.x+0.5,loc.y+2.5,loc.z+0.5])) + "m)",
- loc.x+0.5,
- loc.y+1.5,
- loc.z+0.5,
- loc.clicked? 65280:(loc.nearest?16711680:6579300), true, loc.clicked? 0.04:(loc.nearest?1:0.5), !loc.clicked
- );
+
+ let name = ""
+
+ if(loc.fromApi){
+ name = (loc.nearest?"§c":"§a")+"(" + (loc.chain+1) + "/4) " + typeReplace[loc.type] + " burrial"
+ }else{
+ name = (loc.nearest?"§c":"§a")+typeReplace[loc.type] + " burrial"
+ }
+
+ drawCoolWaypoint(loc.x, loc.y,loc.z,0,blue?100:255,blue?255:0, {name: name})
}
})
}