aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-21 18:34:15 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-21 18:34:15 +0800
commit4235ffd80ac8829266a7b9528c0205a0831686e2 (patch)
treef34bdeabbf1d681ea278274cf42925c28bc288cd
parent64cff6227af6e5f1df9685c93a2672c00a1ac171 (diff)
downloadSoopyV2-4235ffd80ac8829266a7b9528c0205a0831686e2.tar.gz
SoopyV2-4235ffd80ac8829266a7b9528c0205a0831686e2.tar.bz2
SoopyV2-4235ffd80ac8829266a7b9528c0205a0831686e2.zip
update
-rw-r--r--features/betterGuis/dungeonReadyGui.js44
-rw-r--r--features/betterGuis/index.js6
-rw-r--r--features/dungeonMap/index.js2
-rw-r--r--features/dungeonSolvers/index.js28
-rw-r--r--features/hud/index.js48
-rw-r--r--features/nether/index.js74
-rw-r--r--features/nether/metadata.json8
-rw-r--r--features/settings/settingThings/settingBase.js74
-rw-r--r--features/slayers/index.js20
9 files changed, 255 insertions, 49 deletions
diff --git a/features/betterGuis/dungeonReadyGui.js b/features/betterGuis/dungeonReadyGui.js
index a0c928c..c9bf63f 100644
--- a/features/betterGuis/dungeonReadyGui.js
+++ b/features/betterGuis/dungeonReadyGui.js
@@ -4,6 +4,7 @@ import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseCl
import BoxWithTextAndDescription from "../../../guimanager/GuiElement/BoxWithTextAndDescription"
import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"
import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"
+import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"
const ContainerChest = Java.type("net.minecraft.inventory.ContainerChest")
@@ -28,10 +29,15 @@ class DungeonReadyGui {
}))
this.soopyGui.element.addChild(this.startButton)
+ this.startButton.desc = new SoopyTextElement().setMaxTextScale(2).setLocation(0.05, 0.6, 0.7, 0.4).setText("")
+ this.startButton.addChild(this.startButton.desc)
+
this.closeMenu = 0
this.nameToId = {}
this.nextId = 0
+ this.currPlayers = 1
this.readyBoxes = []
+ this.confirmationCooldown = 0
for (let i = 0; i < 4; i++) {
let readyBox = new BoxWithTextAndDescription().setText("§0").setDesc("§0").setLocation(0.1 + 0.2 * i, 0.75, 0.15, 0.15).setColor(255, 150, 150)
this.readyBoxes.push(readyBox)
@@ -72,9 +78,21 @@ class DungeonReadyGui {
this.mainPage.addChild(this.playerReadyButton)
}
+ joinedDungeon(players) {
+ this.currPlayers = players
+ }
+
startDungeon() {
if (Player.getContainer().getName() !== "Start Dungeon?") return
+ if (!this.confirmationCooldown && World.getAllPlayers().filter(p => p.getPing() === 1).length !== this.currPlayers) {
+ this.startButton.setText("§0Confirm starting Dungeon? (3s)")
+ this.startButton.desc.setText("§0(" + World.getAllPlayers().filter(p => p.getPing() === 1).length + "/" + this.currPlayers + " in dungeon)")
+ this.confirmationCooldown = Date.now() + 3000
+ return
+ }
+ if (Date.now() < this.confirmationCooldown) return
+
this.startButton.visable = false
Player.getContainer().click(13, false, "MIDDLE")
}
@@ -107,6 +125,10 @@ class DungeonReadyGui {
this.nextId = 0
this.closeMenu = 0
+ this.startButton.setText("§0Start Dungeon")
+ this.startButton.desc.setText("")
+ this.confirmationCooldown = 0
+
this.readyBoxes.forEach(b => {
b.visable = false
})
@@ -153,7 +175,8 @@ class DungeonReadyGui {
} else {
this.readyBoxes[boxId].setColor(255, 150, 150)
}
- this.readyBoxes[boxId].setDesc("§0" + Player.getContainer().getStackInSlot(3 + i).getLore()[1])
+ this.readyBoxes[boxId].setLore(Player.getContainer().getStackInSlot(3 + i).getLore())
+ this.readyBoxes[boxId].setDesc("§0" + ChatLib.removeFormatting(Player.getContainer().getStackInSlot(3 + i).getLore()[2]))
}
}
}
@@ -162,12 +185,25 @@ class DungeonReadyGui {
//select class buttons
if (Player.getContainer().getStackInSlot(2 + 4 * 9 + i)) {
if (Player.getContainer().getStackInSlot(2 + 4 * 9 + i).getDamage() === 10) {
- this.currentPlayerClass = i
this.classBoxes[i].setColor(250, 255, 150)
} else {
this.classBoxes[i].setColor(253, 255, 227)
}
this.classBoxes[i].setText("§0" + Object.keys(this.classes)[i] + "§7 - " + ChatLib.removeFormatting(Player.getContainer().getStackInSlot(2 + 4 * 9 + i).getName().split(" ")[0])).setLore(Player.getContainer().getStackInSlot(2 + 4 * 9 + i).getLore())
+
+ let isPlayerClass = false
+ Player.getContainer().getStackInSlot(2 + 4 * 9 + i).getLore().forEach(line => {
+ if (!ChatLib.removeFormatting(line).startsWith(" - ")) return
+
+ if (ChatLib.removeFormatting(line.split(" ").pop()) === Player.getName()) {
+ isPlayerClass = true
+ }
+ })
+
+ if (isPlayerClass) {
+ this.currentPlayerClass = i
+ this.classBoxes[i].setColor(150, 255, 150)
+ }
} else {
clickingClassButton = i
}
@@ -179,6 +215,10 @@ class DungeonReadyGui {
}
}
+ if (this.confirmationCooldown) {
+ this.startButton.setText("§0Confirm starting Dungeon? (" + Math.ceil(Math.max(0, this.confirmationCooldown - Date.now()) / 1000) + "s)")
+ }
+
World.getAllPlayers().filter(p => p.getPing() === 1).forEach(p => {
if (p.getUUID().toString() === Player.getUUID().toString()) return
diff --git a/features/betterGuis/index.js b/features/betterGuis/index.js
index 128b2d1..f2af866 100644
--- a/features/betterGuis/index.js
+++ b/features/betterGuis/index.js
@@ -112,6 +112,12 @@ class BetterGuis extends Feature {
this.registerEvent("worldLoad", () => {
this.dungeonReady.reset()
})
+ this.registerChat("&e${*} &r&cThe Catacombs &r&ewith &r&9${players}/5 players &r&eon &r${*}&r", (players) => {
+ if (this.dungeonReadyGuiEnabled.getValue()) this.dungeonReady.joinedDungeon.call(this.dungeonReady, ~~players)
+ })
+ this.registerChat("&eSkyBlock Dungeon Warp &r&7(${players} players)&r", (players) => {
+ if (this.dungeonReadyGuiEnabled.getValue()) this.dungeonReady.joinedDungeon.call(this.dungeonReady, ~~players)
+ })
this.registerStep(true, 10, this.step)
this.registerEvent("worldUnload", () => { this.museumGui.saveMuseumCache.call(this.museumGui) })
this.registerStep(false, 30, () => { this.museumGui.saveMuseumCache.call(this.museumGui) })
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js
index 6facb3a..e2e84ed 100644
--- a/features/dungeonMap/index.js
+++ b/features/dungeonMap/index.js
@@ -15,6 +15,7 @@ import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow";
import ImageLocationSetting from "../settings/settingThings/imageLocation";
import socketConnection from "../../socketConnection";
import SoopyKeyPressEvent from "../../../guimanager/EventListener/SoopyKeyPressEvent";
+import SettingBase from "../settings/settingThings/settingBase";
const BufferedImage = Java.type("java.awt.image.BufferedImage")
const AlphaComposite = Java.type("java.awt.AlphaComposite")
@@ -30,6 +31,7 @@ class DungeonMap extends Feature {
onEnable() {
this.initVariables()
+ this.mapInfo = new SettingBase("NOTE: The more players in the party with this", "category enabled the more accurate the map will be.", undefined, "map_info", this)
this.renderMap = new ToggleSetting("Render Map", "Toggles Rendering the map on the hud", false, "dmap_render", this)
this.mapLocation = new ImageLocationSetting("Map Location", "Sets the location of the map on the hud", "dmap_location", this, [10, 10, 1], new Image(javax.imageio.ImageIO.read(new java.io.File("./config/ChatTriggers/modules/SoopyV2/features/dungeonMap/map.png"))), 100, 100).requires(this.renderMap)
this.mapBackground = new ToggleSetting("Map Background And Border", "Puts a grey background behind the map + Black border", true, "dmap_background", this)
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js
index 23e45b9..5088e75 100644
--- a/features/dungeonSolvers/index.js
+++ b/features/dungeonSolvers/index.js
@@ -172,6 +172,7 @@ class DungeonSolvers extends Feature {
this.bloodOpenedBonus = false;
this.goneInBonus = false;
+ this.mimicDead = false
this.registerChat("&r&cThe &r&c&lBLOOD DOOR&r&c has been opened!&r", () => {
this.bloodOpenedBonus = true;
this.goneInBonus = true;
@@ -187,6 +188,21 @@ class DungeonSolvers extends Feature {
this.bloodOpenedBonus = false;
});
})
+ this.registerEvent("entityDeath", (entity) => {
+ if (entity.getClassName() === "EntityZombie") {
+ if (entity.getEntity().func_70631_g_()) {
+ if (entity.getEntity().func_82169_q(0) === null && entity.getEntity().func_82169_q(1) === null && entity.getEntity().func_82169_q(2) === null && entity.getEntity().func_82169_q(3) === null) {
+ this.mimicDead = true
+ }
+ }
+ }
+ })
+ let mimicDeadMessages = ["$SKYTILS-DUNGEON-SCORE-MIMIC$", "Mimic Killed!", "Mimic Dead!", "Mimic dead!"]
+ this.registerChat("&r&9Party &8> ${msg}", (msg) => {
+ mimicDeadMessages.forEach(dmsg => {
+ if (msg.includes(dmsg)) this.mimicDead = true
+ })
+ })
this.registerChat("&r&aDungeon starts in 1 second.&r", () => {
this.goneInBonus = false;
@@ -261,7 +277,6 @@ class DungeonSolvers extends Feature {
let currentSecretsFound = parseInt(this.FeatureManager.features["dataLoader"].class.stats["Secrets Found"]);
let currentSecretPercent = parseFloat(this.FeatureManager.features["dataLoader"].class.stats["Secrets Found%"].replace("%", "")) / 100;
- let mimicKilled = false; //TODO: this
let crypts = parseInt(this.FeatureManager.features["dataLoader"].class.stats["Crypts"]);
let ezpz = false;
@@ -285,7 +300,7 @@ class DungeonSolvers extends Feature {
} else {
speedScore = 0;
}
- let bonus = Math.min(5, crypts) + mimicKilled * 2 + ezpz * 10;
+ let bonus = Math.min(5, crypts) + this.mimicDead * 2 + ezpz * 10;
//Calculating secrets for s/s+
@@ -293,7 +308,7 @@ class DungeonSolvers extends Feature {
let hypotheticalSpeedScore = speedScore
//Calculating for S
- let hypotheticalBonusScoreS = Math.min(5, crypts) + mimicKilled * 2 + ezpz * 10;
+ let hypotheticalBonusScoreS = Math.min(5, crypts) + this.mimicDead * 2 + ezpz * 10;
let sNeededSecrets = Math.min(maxSecrets * secretPercentRequired, Math.ceil((270 - hypotheticalSkillScore - hypotheticalBonusScoreS - hypotheticalSpeedScore - 60) * maxSecrets * secretPercentRequired / 40));
@@ -302,13 +317,13 @@ class DungeonSolvers extends Feature {
let hypotheticalScoreGottenS = hypotheticalSkillScore + hypotheticalSpeedScore + hypotheticalBonusScoreS + 60 + Math.floor(Math.min(40, (40 * sNeededSecrets) / secretPercentRequired / maxSecrets));
let sCryptsNeeded = Math.max(crypts, Math.min(5, (270 - hypotheticalScoreGottenS)))
hypotheticalScoreGottenS -= hypotheticalBonusScoreS
- hypotheticalBonusScoreS = sCryptsNeeded + mimicKilled * 2 + ezpz * 10
+ hypotheticalBonusScoreS = sCryptsNeeded + this.mimicDead * 2 + ezpz * 10
hypotheticalScoreGottenS += hypotheticalBonusScoreS
let sPossible = hypotheticalScoreGottenS >= 270
//Calculating for S+
- let hypotheticalBonusScoreSplus = 5 + mimicKilled * 2 + ezpz * 10;
+ let hypotheticalBonusScoreSplus = 5 + this.mimicDead * 2 + ezpz * 10;
let splusNeededSecrets = Math.ceil((300 - hypotheticalSkillScore - hypotheticalBonusScoreSplus - hypotheticalSpeedScore - 60) * maxSecrets * secretPercentRequired / 40);
@@ -319,7 +334,7 @@ class DungeonSolvers extends Feature {
let hypotheticalScoreGottenSPlus = hypotheticalSkillScore + hypotheticalSpeedScore + hypotheticalBonusScoreSplus + 60 + Math.floor(Math.min(40, (40 * splusNeededSecrets) / secretPercentRequired / maxSecrets));
let splusCryptsNeeded = Math.max(crypts, 5 - (hypotheticalScoreGottenSPlus - 300))
hypotheticalScoreGottenSPlus -= hypotheticalBonusScoreSplus
- hypotheticalBonusScoreSplus = splusCryptsNeeded + mimicKilled * 2 + ezpz * 10
+ hypotheticalBonusScoreSplus = splusCryptsNeeded + this.mimicDead * 2 + ezpz * 10
hypotheticalScoreGottenSPlus += hypotheticalBonusScoreSplus
//Setting hud element
@@ -461,6 +476,7 @@ class DungeonSolvers extends Feature {
onWorldLoad() {
this.goneInBonus = false;
this.bloodOpenedBonus = false;
+ this.mimicDead = false
this.lividData.correctLividColor = undefined;
this.lividData.correctLividColorHP = undefined;
this.lividData.sayLividColors = [];
diff --git a/features/hud/index.js b/features/hud/index.js
index b580908..3a17830 100644
--- a/features/hud/index.js
+++ b/features/hud/index.js
@@ -106,6 +106,14 @@ class Hud extends Feature {
.editTempText("&6Soulflow&7> &f12,345"))
this.hudElements.push(this.soulflowElement)
+ this.lagEnabled = new ToggleSetting("Show Lobby TPS", "Calculates the TPS of your current lobby (20=no lag)", true, "lobby_lag", this)
+ this.lagElement = new HudTextElement()
+ .setToggleSetting(this.lagEnabled)
+ .setLocationSetting(new LocationSetting("Lobby TPS Location", "Allows you to edit the location of the TPS", "lobby_lag_location", this, [10, 70, 1, 1])
+ .requires(this.lagEnabled)
+ .editTempText("&6Tps&7> &f20.0"))
+ this.hudElements.push(this.lagElement)
+
this.witherImpactCooldownSetting = new ToggleSetting("Show Wither Impact Cooldown", "This will render a small cooldown above your crosshair", true, "wither_impact_cooldown_enabled", this)
this.guidedSheepCooldownSetting = new ToggleSetting("Show Guided Sheep / Explosive Shot Cooldown", "This will render a small cooldown below your crosshair", true, "guided_sheep_cooldown_enabled", this)
@@ -262,6 +270,41 @@ class Hud extends Feature {
})
this.registerActionBar("${m}", this.actionbarMessage)
+
+ this.registerCustom("packetReceived", this.packetReceived)
+
+ this.packetMoves = 0
+ this.secondPackets = 0
+ this.tps = -1
+ this.lastTps = []
+ this.registerEvent("tick", this.tick)
+ this.registerStep(false, 1, this.step_1second)
+ }
+
+ packetReceived(packet) {
+ this.packetMoves++
+ }
+
+ step_1second() {
+ if (!this.lagEnabled.getValue()) return
+ this.lastTps.push(this.secondPackets)
+ if (this.lastTps.length > 10) this.lastTps.shift()
+ this.tps = this.lastTps.reduce((a, b) => a + b, 0) / this.lastTps.length
+ this.secondPackets = 0
+
+ if (this.lastTps.length > 1) {
+ this.lagElement.setText("&6Tps&7> &f" + Math.min(20, this.tps).toFixed(1))
+ } else {
+ this.lagElement.setText("&6Tps&7> &fLOADING")
+ }
+ }
+
+ tick() {
+ if (!this.lagEnabled.getValue()) return
+ if (this.packetMoves > 0) {
+ this.secondPackets++
+ this.packetMoves = 0
+ }
}
onDisable() {
@@ -620,6 +663,11 @@ class Hud extends Feature {
worldLoad() {
this.lastUpdatedStatData = 0
+ this.packetMoves = 0
+ this.secondPackets = 0
+ this.tps = -1
+ this.lastTps = []
+ this.lagElement.setText("&6Tps&7> &fLOADING")
}
}
diff --git a/features/nether/index.js b/features/nether/index.js
new file mode 100644
index 0000000..d0f29ac
--- /dev/null
+++ b/features/nether/index.js
@@ -0,0 +1,74 @@
+/// <reference types="../../../CTAutocomplete" />
+/// <reference lib="es2015" />
+import { m } from "../../../mappings/mappings";
+import Feature from "../../featureClass/class";
+import ToggleSetting from "../settings/settingThings/toggle";
+const MCBlock = Java.type("net.minecraft.block.Block");
+
+class Nether extends Feature {
+ constructor() {
+ super();
+ }
+
+ onEnable() {
+ this.initVariables();
+
+ this.masteryTimer = new ToggleSetting("Mastery Timer", "Countdown untill a block will turn red", true, "nether_mastery_timer", this)
+
+ this.registerCustom("packetReceived", this.packetReceived)
+
+ this.registerStep(true, 1, this.step1S)
+ this.registerEvent("renderWorld", this.renderWorld)
+
+ this.blocks = []
+ }
+
+ packetReceived(packet, event) {
+ let packetType = new String(packet.class.getSimpleName()).valueOf()
+ if (packetType !== "S23PacketBlockChange") return;
+ let position = new BlockPos(packet[m.getBlockPosition.S23PacketBlockChange]())
+ let blockState = this.getBlockIdFromState(packet[m.getBlockState.S23PacketBlockChange]())
+ let oldBlockState = this.getBlockIdFromState(World.getBlockStateAt(position))
+ if (oldBlockState === 20515 && blockState === 16419) {
+ this.blocks.push({ loc: position, time: Date.now() + 3000 })
+ }
+ if (blockState === 57379) {
+ this.blocks.filter(b => {
+ if (b.loc.x === position.x && b.loc.y === position.y && b.loc.z === position.z) {
+ return false
+ }
+ return true
+ })
+ }
+ //air=0
+ //green=20515
+ //yellow=16419
+ //red=57379
+ }
+
+ renderWorld(event) {
+ this.blocks.forEach(data => {
+ Tessellator.drawString(Math.max(0, (data.time - Date.now()) / 1000).toFixed(1) + "s", data.loc.getX() + 0.5, data.loc.getY() + 0.5, data.loc.getZ() + 0.5, 0, false, 0.05, false)
+ })
+ }
+
+ step1S() {
+ this.blocks = this.blocks.filter(state => Date.now() < state.time)
+ }
+
+ getBlockIdFromState(state) {
+ return MCBlock[m.getStateId](state)
+ }
+
+ initVariables() {
+ }
+
+ onDisable() {
+ this.initVariables();
+ }
+}
+
+let nether = new Nether()
+module.exports = {
+ class: nether,
+}; \ No newline at end of file
diff --git a/features/nether/metadata.json b/features/nether/metadata.json
new file mode 100644
index 0000000..322c840
--- /dev/null
+++ b/features/nether/metadata.json
@@ -0,0 +1,8 @@
+{
+ "name": "Nether",
+ "description": "Nether features",
+ "isHidden": false,
+ "isTogglable": true,
+ "defaultEnabled": true,
+ "sortA": 1
+} \ No newline at end of file
diff --git a/features/settings/settingThings/settingBase.js b/features/settings/settingThings/settingBase.js
index 36bfcc1..3108308 100644
--- a/features/settings/settingThings/settingBase.js
+++ b/features/settings/settingThings/settingBase.js
@@ -9,7 +9,7 @@ import settingsCommunicator from "../settingsCommunicator";
import SoopyMarkdownElement from "../../../../guimanager/GuiElement/SoopyMarkdownElement";
class SettingBase {
- constructor(name, description, defaultVal, settingId, module){
+ constructor(name, description, defaultVal, settingId, module) {
this.name = name;
this.description = description;
this.defaultVal = defaultVal;
@@ -19,7 +19,7 @@ class SettingBase {
this.val = defaultVal;
- this.guiObject = new BoxWithTextAndDescription().setDesc("§0"+this.description.replace(/\n/g, "\n§0")).setText("§0"+this.name).setLocation(0, 0, 1, 0.175)
+ this.guiObject = new BoxWithTextAndDescription().setDesc("§0" + this.description.replace(/\n/g, "\n§0")).setText("§0" + this.name).setLocation(0, 0, 1, 0.175)
this.settingObject = new SoopyGuiElement().setLocation(0.8, 0, 0.2, 1)
@@ -27,22 +27,24 @@ class SettingBase {
this.helpButton = new BoxWithText().setText("§0?").setLocation(3, 3, 0.05, 0.5)
this.helpButton.location.location.setRelative(false, false)
-
- this.helpButton.addEvent(new SoopyMouseClickEvent().setHandler(()=>{
- module.FeatureManager.features.soopyGui.class.openSidebarPage(new SoopyGuiElement().setLocation(0.05,0.05,0.9,0.9).setScrollable(true).addChild(new SoopyMarkdownElement().setLocation(0,0,1,1).setText("Loading...")))
-
- this.getHelp(helpText=>{
- module.FeatureManager.features.soopyGui.class.openSidebarPage(new SoopyGuiElement().setLocation(0.05,0.05,0.9,0.9).setScrollable(true).addChild(new SoopyMarkdownElement().setLocation(0,0,1,1).setText(helpText)))
+
+ this.helpButton.addEvent(new SoopyMouseClickEvent().setHandler(() => {
+ module.FeatureManager.features.soopyGui.class.openSidebarPage(new SoopyGuiElement().setLocation(0.05, 0.05, 0.9, 0.9).setScrollable(true).addChild(new SoopyMarkdownElement().setLocation(0, 0, 1, 1).setText("Loading...")))
+
+ this.getHelp(helpText => {
+ module.FeatureManager.features.soopyGui.class.openSidebarPage(new SoopyGuiElement().setLocation(0.05, 0.05, 0.9, 0.9).setScrollable(true).addChild(new SoopyMarkdownElement().setLocation(0, 0, 1, 1).setText(helpText)))
})
}))
+ this.helpButton.setLore(["Click for more information about this setting"])
+
settingsCommunicator.addSetting(this.moduleId, settingId, this)
- if(!module.FeatureManager.featureSettingsData[this.moduleId]){
+ if (!module.FeatureManager.featureSettingsData[this.moduleId]) {
module.FeatureManager.featureSettingsData[this.moduleId] = {}
}
- if(!module.FeatureManager.featureSettingsData[this.moduleId].subSettings)module.FeatureManager.featureSettingsData[this.moduleId].subSettings = {}
- if(!module.FeatureManager.featureSettingsData[this.moduleId].subSettings[settingId]){
+ if (!module.FeatureManager.featureSettingsData[this.moduleId].subSettings) module.FeatureManager.featureSettingsData[this.moduleId].subSettings = {}
+ if (!module.FeatureManager.featureSettingsData[this.moduleId].subSettings[settingId]) {
module.FeatureManager.featureSettingsData[this.moduleId].subSettings[settingId] = {
value: this.getDefaultValue(),
temp_val: this.getDefaultValue()
@@ -50,7 +52,7 @@ class SettingBase {
module.FeatureManager.featureSettingsDataLastUpdated = true
}
- let temp_val_temp =module.FeatureManager.featureSettingsData[this.moduleId].subSettings[settingId].temp_val
+ let temp_val_temp = module.FeatureManager.featureSettingsData[this.moduleId].subSettings[settingId].temp_val
this.setValue(module.FeatureManager.featureSettingsData[this.moduleId].subSettings[settingId].value)
this.temp_val = temp_val_temp
@@ -61,89 +63,89 @@ class SettingBase {
this.initTime = Date.now()
}
- update(){
- if(this.hasHelp()){
+ update() {
+ if (this.hasHelp()) {
this.guiObject.addChild(this.helpButton)
- this.guiObject.text.setLocation(0.075, 0, 0.8-0.075, 0.6)
- }else{
+ this.guiObject.text.setLocation(0.075, 0, 0.8 - 0.075, 0.6)
+ } else {
this.guiObject.text.setLocation(0, 0, 0.8, 0.6)
}
}
- hasHelp(){
+ hasHelp() {
return helpDataLoader.hasData(this.moduleId, this.settingId)
}
- getHelp(callback){
+ getHelp(callback) {
helpDataLoader.getData(this.moduleId, this.settingId, callback)
}
- getValue(){
+ getValue() {
return this.val;
}
- setValue(val){
- if(this.val === val) return
+ setValue(val) {
+ if (this.val === val) return
this.val = val;
- if(!this.requiresO || this.requiresO.getValue()){
+ if (!this.requiresO || this.requiresO.getValue()) {
this.temp_val = val
}
- if(this.module.FeatureManager.featureSettingsData[this.moduleId].subSettings[this.settingId].value !== val){
+ if (this.module.FeatureManager.featureSettingsData[this.moduleId].subSettings[this.settingId].value !== val) {
this.module.FeatureManager.featureSettingsData[this.moduleId].subSettings[this.settingId].value = val
this.module.FeatureManager.featureSettingsDataLastUpdated = true
}
- if(this.module.FeatureManager.featureSettingsData[this.moduleId].subSettings[this.settingId].temp_val !== this.temp_val){
+ if (this.module.FeatureManager.featureSettingsData[this.moduleId].subSettings[this.settingId].temp_val !== this.temp_val) {
this.module.FeatureManager.featureSettingsData[this.moduleId].subSettings[this.settingId].temp_val = this.temp_val
this.module.FeatureManager.featureSettingsDataLastUpdated = true
}
- if(this.onchangethings && Date.now()-this.initTime > 1000) this.onchangethings.forEach(([fun, context])=>{fun.call(context)})
+ if (this.onchangethings && Date.now() - this.initTime > 1000) this.onchangethings.forEach(([fun, context]) => { fun.call(context) })
}
- getName(){
+ getName() {
return this.name;
}
- getDescription(){
+ getDescription() {
return this.description;
}
- getDefaultValue(){
+ getDefaultValue() {
return this.defaultVal;
}
- getGuiObject(){
+ getGuiObject() {
return this.guiObject;
}
- requires(toggleSetting){
+ requires(toggleSetting) {
this.requiresO = toggleSetting
- toggleSetting.toggleObject.addEvent(new SoopyContentChangeEvent().setHandler((newVal, oldVal, resetFun)=>{
- if(newVal){
+ toggleSetting.toggleObject.addEvent(new SoopyContentChangeEvent().setHandler((newVal, oldVal, resetFun) => {
+ if (newVal) {
this.guiObject.location.size.y.set(0.2, 500)
- }else{
+ } else {
this.guiObject.location.size.y.set(0, 500)
}
}))
let newVal = this.requiresO.getValue()
- if(!newVal){
+ if (!newVal) {
this.guiObject.location.size.y.set(0, 0)
}
return this
}
- delete(){
+ delete() {
settingsCommunicator.removeSetting(this.module, this.settingId)
}
- onchange(context, fun){
+ onchange(context, fun) {
this.onchangethings.push([fun, context])
return this
}
diff --git a/features/slayers/index.js b/features/slayers/index.js
index 49fc89c..c0648c6 100644
--- a/features/slayers/index.js
+++ b/features/slayers/index.js
@@ -206,7 +206,8 @@ class Slayers extends Feature {
tarantula: "spider",
sven: "wolf",
voidgloom: "enderman",
- };
+ inferno: "blaze"
+ }
this.lastSlayerType = slayerStrToType[slayerInfo.split(" ")[0].toLowerCase()];
//slayerExp[lastSlayerType] += lastSlayerExp
}
@@ -271,6 +272,14 @@ class Slayers extends Feature {
this.nextIsBoss = false;
}
}
+
+ if (e instanceof net.minecraft.entity.item.EntityArmorStand && e[m.getCustomNameTag]()) {
+ let name = e[m.getCustomNameTag]()
+ let isPiller = true
+ if (name.split(" ")[0].split("").pop() !== "s") isPiller = false
+ if (name.split(" ")[0].split("").pop() !== "s") isPiller = false
+ //TODO: thus
+ }
} catch (_) {
console.log(JSON.stringify(_, undefined, 2));
}
@@ -383,10 +392,11 @@ class Slayers extends Feature {
if (!isSoopyServer || !isLatest) return;
if (dataType !== "skyblock") return;
- this.slayerExp.zombie = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.zombie.xp;
- this.slayerExp.spider = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.spider.xp;
- this.slayerExp.wolf = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.wolf.xp;
- this.slayerExp.enderman = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.enderman.xp;
+ this.slayerExp.zombie = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.zombie?.xp;
+ this.slayerExp.spider = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.spider?.xp;
+ this.slayerExp.wolf = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.wolf?.xp;
+ this.slayerExp.enderman = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.enderman?.xp;
+ this.slayerExp.blaze = data.data.profiles[data.data.stats.currentProfileId].members[Player.getUUID().replace(/-/g, "")].slayer.blaze?.xp;
}
renderOverlay() {