diff options
Diffstat (limited to 'features/events/index.js')
-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) |