From 38b52c027450cb4c26d62a3beb5822c6c607e8c2 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 23 Nov 2021 21:21:56 +0800 Subject: Add basic performance tracking, will make this a dedicated gui sometime --- features/dungeonSolvers/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'features/dungeonSolvers') diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js index 0d9a825..bdeff6e 100644 --- a/features/dungeonSolvers/index.js +++ b/features/dungeonSolvers/index.js @@ -47,7 +47,8 @@ class DungeonSolvers extends Feature { this.registerEvent("renderOverlay", this.renderHud) this.registerEvent("renderWorld", this.renderWorld) - this.registerEvent("renderEntity", this.renderEntity) + // this.registerEvent("renderEntity", this.renderEntity) + this.renderEntityEvent = undefined } renderWorld(ticks){ @@ -135,6 +136,16 @@ class DungeonSolvers extends Feature { } }) } + + if(this.lividData.correctLividEntity){ + if(!this.renderEntityEvent){ + this.renderEntityEvent = this.registerEvent("renderEntity", this.renderEntity) + } + }else{ + if(this.renderEntityEvent){ + this.unregisterEvent(this.renderEntityEvent) + } + } } initVariables(){ -- cgit