diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/cosmetics/index.js | 2 | ||||
-rw-r--r-- | features/globalSettings/index.js | 9 | ||||
-rw-r--r-- | features/hud/index.js | 4 | ||||
-rw-r--r-- | features/slayers/index.js | 16 | ||||
-rw-r--r-- | features/soopyGui/index.js | 2 |
5 files changed, 19 insertions, 14 deletions
diff --git a/features/cosmetics/index.js b/features/cosmetics/index.js index ffe25dc..6c832ef 100644 --- a/features/cosmetics/index.js +++ b/features/cosmetics/index.js @@ -194,7 +194,7 @@ class Cosmetics extends Feature { } shouldPlayerHaveCosmetic(player, cosmetic) { - if (!!this.cosmeticsData[player.getUUID().toString().replace(/-/g, "")]?.[cosmetic]) { + if (this.getPlayerCosmeticSettings(player, cosmetic)) { if (!this.getPlayerCosmeticSettings(player, cosmetic).enabled) return false return true } 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 diff --git a/features/hud/index.js b/features/hud/index.js index a889345..6f23b24 100644 --- a/features/hud/index.js +++ b/features/hud/index.js @@ -14,9 +14,6 @@ import { numberWithCommas } from "../../utils/numberUtils.js"; const ProcessBuilder = Java.type("java.lang.ProcessBuilder") const Scanner = Java.type("java.util.Scanner") -const Base64 = Java.type("java.util.Base64") -const CompressedStreamTools = Java.type("net.minecraft.nbt.CompressedStreamTools") -const ByteArrayInputStream = Java.type("java.io.ByteArrayInputStream") class Hud extends Feature { constructor() { @@ -405,6 +402,7 @@ class Hud extends Feature { let time = instant.getEpochSecond() + (instant.getNano() / 1000000000); let thisframeTime = time - this.lastFrame + // console.log(thisframeTime * 1000) if (thisframeTime > this.slowestFrameTime) { this.slowestFrameTime = thisframeTime diff --git a/features/slayers/index.js b/features/slayers/index.js index 590970a..348f7c4 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -305,21 +305,19 @@ class Slayers extends Feature { } if (this.BoxAroundMiniboss.getValue() || this.betterHideDeadEntity.getValue()) { - World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach(name => { - let MobName = `${name.getName().removeFormatting().split(" ")[0]} ${name.getName().removeFormatting().split(" ")[1]}` + let entitys = World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand) + for (let name of entitys) { + let nameSplit = name.getName().removeFormatting().split(" ") + let MobName = nameSplit[0] + " " + nameSplit[1] if (this.BoxAroundMiniboss.getValue() && !this.bossSpawnedMessage && this.Miniboss[this.lastSlayerType]?.has(MobName) && !this.minibossEntity.map(a => a[0].getUUID().toString()).includes(name.getUUID().toString())) { - this.minibossEntity.push([new Entity(name.getEntity()), this.lastSlayerType]); + this.minibossEntity.push([name, this.lastSlayerType]); } if (this.betterHideDeadEntity.getValue()) { - if (name.getName().removeFormatting().split(" ")[name.getName().removeFormatting().split(" ").length - 1] === "0❤" || - ( - name.getName().removeFormatting().split(" ")[name.getName().removeFormatting().split(" ").length - 1].split("/")[0] === "0" - && name.getName().removeFormatting().includes("❤")) - ) { + if (nameSplit[nameSplit.length - 1][0] === "0" && nameSplit[nameSplit.length - 1].endsWith("❤")) { name.getEntity()[m.setAlwaysRenderNameTag](false) } } - }); + } } } diff --git a/features/soopyGui/index.js b/features/soopyGui/index.js index 32ac1a7..1d4bc45 100644 --- a/features/soopyGui/index.js +++ b/features/soopyGui/index.js @@ -103,7 +103,7 @@ class SoopyGui extends Feature { this.buttonListElm.children = [] - this.getPages().forEach((p, i) => { + if (this.getPages()) this.getPages().forEach((p, i) => { let settingsButton = new ButtonWithArrow().setText("§0" + p.name).setLocation(0, 0.225 * i, 1, 0.2) settingsButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { this.clickedOpen(p) })) this.buttonListElm.addChild(settingsButton) |