From d8aa514a40f3856376e50f180da3c3f79c608004 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sun, 29 May 2022 21:15:14 +0800 Subject: more forge side rendering changes --- features/bestiary/index.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'features/bestiary/index.js') diff --git a/features/bestiary/index.js b/features/bestiary/index.js index 00d5752..d21fc2a 100644 --- a/features/bestiary/index.js +++ b/features/bestiary/index.js @@ -59,10 +59,6 @@ class Bestiary extends Feature { } this.registerStep(false, 5, this.updateHudElements) - this.registerEvent("renderOverlay", this.renderHUD) - // TODO - // dragon - // headless_horseman let lastThing = undefined let lastThingTime = 0 this.registerChat("${chat}", (chat) => { @@ -120,12 +116,6 @@ class Bestiary extends Feature { } } - renderHUD() { - for (let stat of this.hudStat) { - stat.textElement.render() - } - } - getBestiaryCount(id) { if (!this.bestiaryData[id]) return "???" let count = this.bestiaryData[id].count @@ -156,6 +146,8 @@ class Bestiary extends Feature { let type = stat.type.getValue() stat.textElement.setText(`&6${this.bestiaryData[type]?.guiName}&7> &f${numberWithCommas(this.getBestiaryCount(type))}`) + } else { + stat.textElement.setText("") } }) } @@ -248,6 +240,7 @@ class Bestiary extends Feature { } onDisable() { + this.hudStat.forEach(h => h.textElement.delete()) this.saveData() } -- cgit