diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt | 10 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt index 5dca40d1b..5b31248d7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/SummoningMobManager.kt @@ -95,10 +95,12 @@ class SummoningMobManager { it is EntityLiving && it !in summoningMobs.keys && it.getLorenzVec().distance(playerLocation) < 3 } .forEach { - summoningMobs[it as EntityLiving] = SummoningMob(System.currentTimeMillis(), name = "Mob") - updateData() - if (summoningMobs.size == summoningsSpawned) { - searchMobs = false + if (it.ticksExisted == 0) { + summoningMobs[it as EntityLiving] = SummoningMob(System.currentTimeMillis(), name = "Mob") + updateData() + if (summoningMobs.size == summoningsSpawned) { + searchMobs = false + } } } } diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt index 718c8adfc..291000c77 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.utils.toLorenzVec import net.minecraft.client.Minecraft import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand +import net.minecraft.entity.monster.EntityEnderman import net.minecraft.entity.monster.EntityMagmaCube object CopyNearbyEntitiesCommand { @@ -72,6 +73,10 @@ object CopyNearbyEntitiesCommand { } } + } else if (entity is EntityEnderman) { + val enderman = entity as EntityEnderman + val heldItem = enderman.heldItem + resultList.add("enderman heldItem: $heldItem") } else { if (entity is EntityLivingBase) { val baseMaxHealth = entity.baseMaxHealth |