aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com>2022-06-23 01:44:01 +0800
committerGitHub <noreply@github.com>2022-06-23 01:44:01 +0800
commit8a7c2926939ab05430d855e1c058048a3e705bd6 (patch)
tree5dbf0d034dafe40827dbd461b9ddb1fd80c2e81f
parent84a927cbbc875a920a1588b712ffd8e5fcaf95bd (diff)
downloadSoopyV2-8a7c2926939ab05430d855e1c058048a3e705bd6.tar.gz
SoopyV2-8a7c2926939ab05430d855e1c058048a3e705bd6.tar.bz2
SoopyV2-8a7c2926939ab05430d855e1c058048a3e705bd6.zip
small fix
- added an filter so that it only pushes new miniboss into minibossEntity array instead of pushing duplicated ones into it every single tick
-rw-r--r--features/slayers/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/features/slayers/index.js b/features/slayers/index.js
index 88765f9..f1388a2 100644
--- a/features/slayers/index.js
+++ b/features/slayers/index.js
@@ -291,7 +291,7 @@ class Slayers extends Feature {
if (this.BoxAroundMiniboss.getValue() || this.betterHideDeadEntity.getValue()) {
World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach(name => {
let MobName = `${name.getName().removeFormatting().split(" ")[0]} ${name.getName().removeFormatting().split(" ")[1]}`
- if (this.BoxAroundMiniboss.getValue() && !this.bossSpawnedMessage && this.Miniboss[this.lastSlayerType]?.has(MobName)) {
+ if (this.BoxAroundMiniboss.getValue() && !this.bossSpawnedMessage && this.Miniboss[this.lastSlayerType]?.has(MobName) && !this.minibossEntity.includes([new Entity(name.getEntity()), this.lastSlayerType])) {
this.minibossEntity.push([new Entity(name.getEntity()), this.lastSlayerType]);
}
if (this.betterHideDeadEntity.getValue()) {