From 2ed8a3d07cb20172d4f499dca8b422643e30bce2 Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Mon, 19 Sep 2022 06:09:39 +0800 Subject: fixed nether mini hp hud sometimes not working --- src/features/nether/index.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/features') diff --git a/src/features/nether/index.js b/src/features/nether/index.js index 4b14c48..5b325fa 100644 --- a/src/features/nether/index.js +++ b/src/features/nether/index.js @@ -215,18 +215,6 @@ class Nether extends Feature { this.controlLocLast = undefined this.controlLoc = undefined } - - this.todoM2.forEach(e => { - let name = e[m.getCustomNameTag]() - if (name) { - if (name.includes("Ashfang") || name.includes("Barbarian Duke X") || name.includes("Bladesoul") || name.includes("Mage Outlaw")) { - this.miniboss = new Entity(e) - } - } - }) - - this.todoM2 = this.todoM - this.todoM = [] } entityJoinWorldEvent(event) { @@ -354,6 +342,18 @@ class Nether extends Feature { } minibossHPHud() { + this.todoM2.forEach(e => { + let name = e[m.getCustomNameTag]() + if (name) { + if (name.includes("Ashfang") || name.includes("Barbarian Duke X") || name.includes("Bladesoul") || name.includes("Mage Outlaw")) { + this.miniboss = new Entity(e) + } + } + }) + + this.todoM2 = this.todoM + this.todoM = [] + if (this.miniboss && this.miniboss.getEntity()[f.isDead]) this.miniboss = undefined if (!this.minibossNametag.getValue() || !this.miniboss) { this.minibossNametagElement.setText("") -- cgit