diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-06-25 22:25:39 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-06-25 22:25:39 +0800 |
commit | 24f2fddb6f70576bc101021637014af1bdbb68b6 (patch) | |
tree | c65d9c01a6d475e4737fc54ca67ae12e3c7d8fe3 /features/globalSettings | |
parent | b1bc366e52cf719f0e3f01719fd787e7873baf84 (diff) | |
download | SoopyV2-24f2fddb6f70576bc101021637014af1bdbb68b6.tar.gz SoopyV2-24f2fddb6f70576bc101021637014af1bdbb68b6.tar.bz2 SoopyV2-24f2fddb6f70576bc101021637014af1bdbb68b6.zip |
+ finish performance thing (mostly)
+ optimisations for slayer hide 0hp nametags
Diffstat (limited to 'features/globalSettings')
-rw-r--r-- | features/globalSettings/index.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 1e4bba1..bf918f1 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -46,6 +46,8 @@ class GlobalSettings extends Feature { this.reportErrorsSetting = new ToggleSetting("Send module errors to soopy server", "This will allow me to more effectivly fix them", false, "privacy_send_errors", this) + this.hideFallingBlocks = new ToggleSetting("Hide falling blocks", "NOTE: this may cause more lag because of render entity event", false, "hide_falling_sand", this) + this.privacySettings = [this.reportErrorsSetting] this.firstLoadPageData = JSON.parse(FileLib.read("soopyAddonsData", "soopyv2firstloaddata.json") || "{}") || {} @@ -55,6 +57,13 @@ class GlobalSettings extends Feature { soopyV2Server.reportErrorsSetting = this.reportErrorsSetting this.registerChat("&aYour new API key is &r&b${key}&r", this.newKey) + const EntityFallingBlock = Java.type("net.minecraft.entity.item.EntityFallingBlock"); + + this.registerEvent('renderEntity', (entity, posVec, partialTicks, event) => { + if (entity.getEntity() instanceof EntityFallingBlock) { + cancel(event); + } + }).registeredWhen(() => this.hideFallingBlocks.getValue()) this.ranFirstLoadThing = false |