diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-06 21:40:49 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-06 21:40:49 +0800 |
commit | f0cfad5af93244618d5a60c88b1c0a4837e629ae (patch) | |
tree | 062a301f34c8e6d3284fa845676b23b2ab8d7f9a /features/events | |
parent | e2e2d676ee056e9f44f6c67e29f0952b9ef956b2 (diff) | |
download | SoopyV2-f0cfad5af93244618d5a60c88b1c0a4837e629ae.tar.gz SoopyV2-f0cfad5af93244618d5a60c88b1c0a4837e629ae.tar.bz2 SoopyV2-f0cfad5af93244618d5a60c88b1c0a4837e629ae.zip |
+ Many performance improvements
+ Fix rescue mission waypoints
Diffstat (limited to 'features/events')
-rw-r--r-- | features/events/index.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/features/events/index.js b/features/events/index.js index 8ab5f86..51081fd 100644 --- a/features/events/index.js +++ b/features/events/index.js @@ -25,7 +25,6 @@ class Events extends Feature { this.showingWaypoints = false this.lastPath = [] this.updatingPath = false - this.hudElements = [] this.lastPathCords = undefined @@ -48,24 +47,17 @@ class Events extends Feature { this.shinyBlockOverlayEnabled = new ToggleSetting("Shiny blocks highlight", "Will highlight shiny blocks in the end", false, "shiny_blocks_overlay", this) this.registerEvent("worldLoad", this.worldLoad) - this.registerEvent("spawnParticle", this.spawnParticle) - this.registerEvent("renderWorld", this.renderWorld) - this.registerEvent("renderOverlay", this.renderOverlay) + this.registerEvent("spawnParticle", this.spawnParticle).registeredWhen(() => this.showingWaypoints) + this.registerEvent("renderWorld", this.renderWorld).registeredWhen(() => this.showingWaypoints || this.shinyBlockOverlayEnabled.getValue()) this.registerStep(true, 2, this.step) this.registerStep(false, 5, this.step_5s) - this.registerEvent("soundPlay", this.playSound) + this.registerEvent("soundPlay", this.playSound).registeredWhen(() => this.showingWaypoints) this.registerChat("&r&eYou dug out a Griffin Burrow! &r&7(${*}/4)&r", this.burrialClicked) this.registerChat("&r&eYou finished the Griffin burrow chain! &r&7(4/4)&r", this.burrialClicked) } - renderOverlay() { - for (let element of this.hudElements) { - element.render() - } - } - renderWorld(ticks) { this.shinyBlocks.forEach(([loc]) => { drawBoxAtBlockNotVisThruWalls(loc[0], loc[1], loc[2], 0, 255, 0, 0.1, 0.1) |