diff options
author | EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> | 2022-07-24 00:39:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 00:39:59 +0800 |
commit | b034e2a022c88076c3ce7e205491c05b3b83953d (patch) | |
tree | 5b59c18eec34b0af256aa7250eb9236732eb548e /features | |
parent | bfebde30c5650a3edf00e6cd04de4b10793c87cf (diff) | |
download | SoopyV2-b034e2a022c88076c3ce7e205491c05b3b83953d.tar.gz SoopyV2-b034e2a022c88076c3ce7e205491c05b3b83953d.tar.bz2 SoopyV2-b034e2a022c88076c3ce7e205491c05b3b83953d.zip |
add func
make diana mob hp to actually work
Diffstat (limited to 'features')
-rw-r--r-- | features/events/index.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/features/events/index.js b/features/events/index.js index 9eed7af..ea42a64 100644 --- a/features/events/index.js +++ b/features/events/index.js @@ -1,6 +1,6 @@ /// <reference types="../../../CTAutocomplete" /> /// <reference lib="es2015" /> -import { m } from "../../../mappings/mappings"; +import { f, m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; import socketConnection from "../../socketConnection"; import { drawBoxAtBlock, drawBoxAtBlockNotVisThruWalls, drawCoolWaypoint, drawLine } from "../../utils/renderUtils"; @@ -69,7 +69,7 @@ class Events extends Feature { this.MythMobsHPGuiElement = new ToggleSetting("Render Mythological Mobs hp on your screen", "This will help you to know their HP.", true, "myth_mobs_hp", this).contributor("EmeraldMerchant"); this.MythMobsHP = new HudTextElement().setToggleSetting(this.MythMobsHPGuiElement).setLocationSetting(new LocationSetting("Mythological Mobs Hp Location", "Allows you to edit the location of Mythological Mobs hp", "myth_mobs_location", this, [10, 50, 1, 1]).requires(this.MythMobsHPGuiElement).editTempText("&8[&7Lv750&8] &2Exalted Minos Inquisitor &a40M&f/&a40M&c❤&r")); this.hudElements.push(this.MythMobsHP); - + this.Mobs = [] this.lastDing = 0 this.lastDingPitch = 0 this.firstPitch = 0 @@ -123,12 +123,26 @@ class Events extends Feature { } }) + this.registerStep(true, 4, this.step_4fps) + this.registerCommand("sethubwarp", () => { warpData.worldload = [Player.getX(), Player.getY(), Player.getZ()] ChatLib.chat(this.FeatureManager.messagePrefix + "Set /hub location!") }) } + step_4fps() { + if (!this.MythMobsHPGuiElement.getValue()) return + World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach((mob) => { + let name = mob.getName() + if ((name.includes("Exalted") || name.includes("Stalwart")) && !name.split(" ")[2].startsWith("0")) { + this.Mobs.push(name) + } + }) + this.MythMobsHP.setText(this.Mobs.join("\n")) + this.Mobs = [] + } + entityJoinWorldEvent(e) { if (this.otherInquisWaypoints.getValue()) this.todoE.push(e.entity); } @@ -318,6 +332,7 @@ class Events extends Feature { this.lastPathCords = undefined this.lastWorldChange = Date.now() + this.Mobs = [] } playSound(pos, name, volume, pitch, categoryName, event) { @@ -571,6 +586,7 @@ class Events extends Feature { this.updatingPath = undefined this.lastPathCords = undefined this.hudElements = []; + this.Mobs = [] } onDisable() { |