aboutsummaryrefslogtreecommitdiff
path: root/features/specialMining/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'features/specialMining/index.js')
-rw-r--r--features/specialMining/index.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/features/specialMining/index.js b/features/specialMining/index.js
index 5537097..d58a978 100644
--- a/features/specialMining/index.js
+++ b/features/specialMining/index.js
@@ -8,6 +8,7 @@ import { delay } from "../../utils/delayUtils";
import TextSetting from "../settings/settingThings/textSetting";
import { drawBoxAtBlock, drawFilledBox } from "../../utils/renderUtils";
import RenderLib2D from "../../utils/renderLib2d";
+import { f, m } from "../../../mappings/mappings";
class PowderAndScatha extends Feature {
constructor() {
@@ -195,6 +196,14 @@ class PowderAndScatha extends Feature {
.setToggleSetting(this.scathaCounter)
.setLocationSetting(new LocationSetting("Scatha Counter Hud Location", "Allows you to edit the location of Scatha Counter Hud", "scatha_mining_hud_location", this, [10, 50, 1, 1]).requires(this.scathaCounter).editTempText(`&6Scatha Counter\n&bKills: 1,000\n&bWorms: 800\n&bScathas: 200\n&bSince Scatha: 10\n&9Rare Scatha Pets: 5\n&5Epic Scatha Pets: 3\n&6Leg Scatha Pets: 1\n&bSince Pet: 20`));
this.hudElements.push(this.scathaCounterElement);
+
+ this.wormEntity = undefined;
+ this.scathaHealth = new ToggleSetting("Scatha Health Hud", "This will show worm/scatha mob HP on screen", false, "scatha_hp_hud", this).requires(this.scathaMain).contributor("EmeraldMerchant");
+ this.scathaHealthElement = new HudTextElement()
+ .setText("")
+ .setToggleSetting(this.scathaHealth)
+ .setLocationSetting(new LocationSetting("Scatha Health Hud Location", "Allows you to edit the location of Scatha Health Hud", "scatha_hp_hud_location", this, [10, 50, 1, 1]).requires(this.scathaHealth).editTempText(`&8[&7Lv5&8] &cWorm &e5&c❤`));
+ this.hudElements.push(this.scathaHealthElement);
new SettingBase("/scathaset <thing> <value>", "This command will change values in the counter", undefined, "scatha_cmd", this).requires(this.scathaMain);
new SettingBase("/ss <thing> <value> works too", "you can press TAB for <thing> auto-complete", undefined, "scatha_cmd2", this).requires(this.scathaMain);
@@ -221,6 +230,7 @@ class PowderAndScatha extends Feature {
this.registerStep(true, 2, this.step2fps);
this.registerStep(true, 3, this.wormStep);
+ this.registerStep(true, 5, this.scathaHP);
}
spawnParticle(particle, type, event) {
@@ -325,6 +335,11 @@ class PowderAndScatha extends Feature {
if (this.miningData.scatha.rare + this.miningData.scatha.epic + this.miningData.scatha.legandary > 0) tempText += `&bSince Pet: ${this.miningData.scatha.since_pet}`
this.scathaCounterElement.setText(tempText)
}
+ World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand)?.forEach(e => {
+ if (e.getName().includes("Brood Mother")) {
+ Client.showTitle("&cBROODMOTHER", "", 1, 5, 1);
+ };
+ });
}
compactPowderChat() {
@@ -388,6 +403,7 @@ class PowderAndScatha extends Feature {
this.miningData.scatha.since_scatha++;
this.saveMiningData()
this.wormSpawned = false;
+ if (this.scathaHealth.getValue()) this.wormEntity = entity
}
if (name.startsWith("§8[§7Lv10§8] §cScatha")) {
if (this.wormSpawnedChatMessage.getValue()) ChatLib.chat("&c&lScatha Spawned.");
@@ -398,16 +414,26 @@ class PowderAndScatha extends Feature {
this.miningData.scatha.since_scatha = 0
this.saveMiningData()
this.wormSpawned = false;
+ if (this.scathaHealth.getValue()) this.wormEntity = entity
}
});
}
+ scathaHP() {
+ let tempText = ""
+ if (!this.wormEntity || !this.scathaHealth.getValue()) return
+ if (this.wormEntity.getEntity()[f.isDead]) this.wormEntity = undefined;
+ tempText = this.wormEntity.getName()
+ this.scathaHealthElement.setText(tempText)
+ }
+
initVariables() {
this.hudElements = [];
this.inCrystalHollows = false;
this.foundWither = true;
this.dPowder = 0;
this.wormSpawned = false;
+ this.wormEntity = undefined;
}
onDisable() {