diff options
Diffstat (limited to 'src')
4 files changed, 5 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugMobConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugMobConfig.java index 709aa883e..c149b6195 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugMobConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugMobConfig.java @@ -44,7 +44,7 @@ public class DebugMobConfig { public boolean logEvents = false; @Expose - @ConfigOption(name = "Show RayHit", desc = "Highlights the mob that is currently in front of your view (only SkyblockMob).") + @ConfigOption(name = "Show RayHit", desc = "Highlights the mob that is currently in front of your view.") @ConfigEditorBoolean public boolean showRayHit = false; diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt index a1e894d32..bb9eb7ac0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt @@ -46,7 +46,7 @@ class MobDebug { fun onWorldRenderDebug(event: LorenzRenderWorldEvent) { if (config.showRayHit || config.showInvisible) { lastRayHit = MobUtils.rayTraceForMobs(Minecraft.getMinecraft().thePlayer, event.partialTicks) - ?.firstOrNull { it.canBeSeen() && (config.showInvisible || it.isInvisible()) } + ?.firstOrNull { it.canBeSeen() && (!config.showInvisible || !it.isInvisible()) } } if (config.skyblockMob.isHighlight()) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt index d3f8601d2..b31b2a47b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt @@ -8,7 +8,6 @@ import at.hannibal2.skyhanni.data.mob.MobFilter.isRealPlayer import at.hannibal2.skyhanni.data.mob.MobFilter.isSkyBlockMob import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent -import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.MobEvent import at.hannibal2.skyhanni.events.PacketEvent @@ -20,7 +19,7 @@ import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.getLorenzVec -import net.minecraft.client.Minecraft +import net.minecraft.client.entity.EntityPlayerSP import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.monster.EntityCreeper @@ -96,7 +95,7 @@ class MobDetection { MobData.previousEntityLiving.addAll(MobData.currentEntityLiving) MobData.currentEntityLiving.clear() MobData.currentEntityLiving.addAll(EntityUtils.getEntities<EntityLivingBase>() - .filter { it !is EntityArmorStand }) + .filter { it !is EntityArmorStand && it !is EntityPlayerSP }) if (forceReset) { MobData.currentEntityLiving.clear() // Naturally removing the mobs using the despawn @@ -319,11 +318,6 @@ class MobDetection { } } - @SubscribeEvent - fun onIslandChange(event: IslandChangeEvent) { - MobData.currentEntityLiving.remove(Minecraft.getMinecraft().thePlayer) // Fix for the Player - } - private val allEntitiesViaPacketId = mutableSetOf<Int>() private fun addEntityUpdate(id: Int) = if (allEntitiesViaPacketId.contains(id)) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/MobUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/MobUtils.kt index e1b165d25..1c632bcee 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/MobUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/MobUtils.kt @@ -72,7 +72,7 @@ object MobUtils { ) }.values if (possibleEntities.isEmpty()) return null - return possibleEntities.distinct().sortedBy { it.baseEntity.distanceTo(pos) }.drop(1) // drop to remove player + return possibleEntities.distinct().sortedBy { it.baseEntity.distanceTo(pos) } } val EntityLivingBase.mob get() = MobData.entityToMob[this] |