aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--featureClass/class.js9
-rw-r--r--featureClass/featureManager.js1
-rw-r--r--features/dungeonMap/index.js18
-rw-r--r--features/dungeonSolvers/index.js2
4 files changed, 23 insertions, 7 deletions
diff --git a/featureClass/class.js b/featureClass/class.js
index dc0ca27..22614b1 100644
--- a/featureClass/class.js
+++ b/featureClass/class.js
@@ -211,14 +211,19 @@ class Event {
if (this.enabled) return
this.enabled = true
- this.actuallyRegister()
+
+ delay(0, () => {
+ this.actuallyRegister()
+ })
}
unregister() {
if (!this.enabled) return
this.enabled = false
- this.actuallyUnregister()
+ delay(0, () => {
+ this.actuallyUnregister()
+ })
}
actuallyRegister() { }
diff --git a/featureClass/featureManager.js b/featureClass/featureManager.js
index 9da76c7..0f0edeb 100644
--- a/featureClass/featureManager.js
+++ b/featureClass/featureManager.js
@@ -414,6 +414,7 @@ class FeatureManager {
// }
// })
// }else{
+
this.eventObjects[event] = register(event, (...args) => {
// let start = Date.now()
this.triggerEvent(event, args)
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js
index ddfb534..68adf7e 100644
--- a/features/dungeonMap/index.js
+++ b/features/dungeonMap/index.js
@@ -861,11 +861,21 @@ class DungeonMap extends Feature {
let renderX = Math.round((parseInt(x) + 16) / this.mapScale + this.offset[0]) // / 128 * size
let renderY = Math.round((parseInt(y) + 16) / this.mapScale + this.offset[1])// / 128 * size
-
- if (bytes[renderX + renderY * 128] === 30) {
- let [first, second] = ent[1].split(" ")
- ent[1] = "&a" + second + " " + second
+ // console.log(renderX, renderY)
+ let isGreen = false
+ for (let i = 0; i < 10; i++) {
+ if (bytes[renderX + i + (renderY + i) * 128] === 30
+ || bytes[renderX + i + 1 + (renderY + i) * 128] === 30) {
+ isGreen = true
+ }
+ }
+ console.log(ent[1], isGreen)
+ if (isGreen) {
+ let total = ent[1].split(" ")[1]
+ ent[1] = "&a" + total + " " + total
+ console.log(ent[1])
}
+ console.log(ent[1], isGreen)
}
}
// if (!this.renderImage) return
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js
index cd90496..2095e10 100644
--- a/features/dungeonSolvers/index.js
+++ b/features/dungeonSolvers/index.js
@@ -1041,7 +1041,7 @@ class DungeonSolvers extends Feature {
step_5fps() {
if (this.IceSprayWarn.getValue()) {
World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach((name) => {
- let MobName = name.getName()
+ let MobName = ChatLib.removeFormatting(name.getName())
if (MobName.includes("Ice Spray Wand") && name.getTicksExisted() <= 199) {
Client.showTitle(`&r&6&l[&b&l&kO&6&l] ${MobName.toUpperCase()} &6&l[&b&l&kO&6&l]`, "", 0, 40, 10);
ChatLib.chat(`&6&lRARE DROP! &r${MobName}`)