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/globalSettings/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'features/globalSettings') diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index ef566c9..856791e 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -44,6 +44,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/less lag because of render entity event", false, "hide_falling_sand", this) + this.privacySettings = [this.reportErrorsSetting] this.firstLoadPageData = JSON.parse(FileLib.read("soopyAddonsData", "soopyv2firstloaddata.json") || "{}") || {} @@ -53,6 +55,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 -- cgit