aboutsummaryrefslogtreecommitdiff
path: root/features/hud/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-03-05 21:17:08 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-03-05 21:17:08 +0800
commit7ba09eb9ee619197849f3ed8de971e6bfab7d721 (patch)
treeaacc1e22caf9d36ed593e2b6aeef7bc19e652d2b /features/hud/index.js
parent4a1947673debcd858247698b2670d0c7a24f04ee (diff)
downloadSoopyV2-7ba09eb9ee619197849f3ed8de971e6bfab7d721.tar.gz
SoopyV2-7ba09eb9ee619197849f3ed8de971e6bfab7d721.tar.bz2
SoopyV2-7ba09eb9ee619197849f3ed8de971e6bfab7d721.zip
performance improvements + fix rare dungeon map breaking issue
Diffstat (limited to 'features/hud/index.js')
-rw-r--r--features/hud/index.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/features/hud/index.js b/features/hud/index.js
index d830104..d37fc42 100644
--- a/features/hud/index.js
+++ b/features/hud/index.js
@@ -313,16 +313,14 @@ class Hud extends Feature {
}
}
-
-
if (this.witherImpactCooldownSetting.getValue() && Date.now()-this.lastWitherImpact < 10000) {
Renderer.drawString(Math.max(0,Math.ceil((5000-(Date.now()-this.lastWitherImpact))/1000)) + "s", Renderer.screen.getWidth() / 2 - Renderer.getStringWidth(Math.max(0,Math.ceil((5000-(Date.now()-this.lastWitherImpact))/1000)) + "s") / 2, Renderer.screen.getHeight() / 2 - 15)
}
- this.hudStat.forEach(stat=>{
+ for(let stat of this.hudStat){
stat.textElement.render()
- })
+ }
}
renderWorld(){