diff options
author | EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> | 2022-06-28 16:06:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 16:06:00 +0800 |
commit | aa430898a4e6528aef5db717a7964c46e4a4906e (patch) | |
tree | 75cf7616a08e23a5d0ad349eb445a1b4a50b8598 /features/slayers | |
parent | 41c172e2371f6bde85e990a2071e583b99c472c3 (diff) | |
download | SoopyV2-aa430898a4e6528aef5db717a7964c46e4a4906e.tar.gz SoopyV2-aa430898a4e6528aef5db717a7964c46e4a4906e.tar.bz2 SoopyV2-aa430898a4e6528aef5db717a7964c46e4a4906e.zip |
another fix
= make the assuming eman boss if data is undefined thing keep scanning thru all entities until it finds one, instead of only scanning the ones that just joined world
Diffstat (limited to 'features/slayers')
-rw-r--r-- | features/slayers/index.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/features/slayers/index.js b/features/slayers/index.js index cacc1cc..31f19f0 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -378,8 +378,14 @@ class Slayers extends Feature { this.renderEntityEvent.unregister(); } - if (this.BoxAroundMiniboss.getValue() || this.betterHideDeadEntity.getValue() || this.summonsHideNametag.getValue() || this.summonsShowNametag.getValue() || this.summonsLowWarning.getValue()) { + if (this.cannotFindEmanBoss || this.BoxAroundMiniboss.getValue() || this.betterHideDeadEntity.getValue() || this.summonsHideNametag.getValue() || this.summonsShowNametag.getValue() || this.summonsLowWarning.getValue()) { World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach((name) => { + if (this.cannotFindEmanBoss) { + if ((e[f.posX.Entity] - Player.getX()) ** 2 + (e[f.posY.Entity] - Player.getY()) ** 2 + (e[f.posZ.Entity] - Player.getZ()) ** 2 < 5) { + this.emanBoss = new Entity(e); + this.cannotFindEmanBoss = false + } + } 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())) { |