From cfeac0b6a71c592b61c53fad192eb22bb24b0f54 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 7 Sep 2022 05:09:48 +0200 Subject: 0.7 (#2) * code cleanup * Option to hide the Skyblock Level from the chat messages, Option to change the way the Skyblock Level gets displayed in the chat * change version to 0.6.1 * add highlight the voidling extremist in pink color * add highlight corrupted mobs in purple color * fixed highlight corrupted mobs in purple color in the private island * another minor fix for highlight corrupted mobs in purple color * created EntityHealthUpdateEvent and fixing CorruptedMobHighlight * using EntityHealthUpdateEvent everywhere * added marking a player with yellow color * highlight slayer miniboss in blue color * /copyentities now shows health correctly for every entity * infer fix * fixing bazaar message filter * changelog * hides the death messages of other players, except for players who are close to the player. * hiding tip messages * highlight deathmites in dungeon in red color * code cleanup * code cleanup * hide tnt laying around in dungeon * fix infer * remove debug * Added hide Blessings laying around in dungeon. Added hide Revive Stones laying around in dungeon. * Hide Premium Flesh laying around in dungeon. * edited LorenzTest * Added dungeon copilot and separate filter for hiding dungeon key and door messages. * Added hide Journal Entry pages laying around in dungeon. * Added hide Skeleton Skulls laying around in dungeon. * credits * Added highlight Skeleton Skulls when combining into a skeleton in orange color (not useful combined with feature Hide Skeleton Skull) * Added highlight Skeleton Skulls when combining into a skeleton in orange color (not useful combined with feature Hide Skeleton Skull) * fix wording * clarification * small fixes * Highlight the enderman slayer Yang Glyph (Beacon) in red color (supports beacon in hand and beacon flying) * better/more readability for CopyNearbyEntitiesCommand * make version 0.7 --- .../features/nether/ashfang/AshfangBlazes.kt | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/nether') diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt index bd0a72e7e..b628593a2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt @@ -1,9 +1,9 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.PacketEvent +import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent import at.hannibal2.skyhanni.events.RenderMobColoredEvent -import at.hannibal2.skyhanni.events.ResetEntityHurtTimeEvent +import at.hannibal2.skyhanni.events.ResetEntityHurtEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.features.damageindicator.BossType import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager @@ -14,7 +14,6 @@ import net.minecraft.client.Minecraft import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.monster.EntityBlaze -import net.minecraft.network.play.server.S1CPacketEntityMetadata import net.minecraftforge.client.event.RenderLivingEvent import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.EventPriority @@ -59,20 +58,14 @@ class AshfangBlazes { } @SubscribeEvent - fun onHealthUpdatePacket(event: PacketEvent.ReceiveEvent) { + fun onHealthUpdateEvent(event: EntityHealthUpdateEvent) { if (!isEnabled()) return - val packet = event.packet - if (packet !is S1CPacketEntityMetadata) return - if (packet.entityId !in blazeArmorStand.keys.map { it.entityId }) return + val entityId = event.entity.entityId + if (entityId !in blazeArmorStand.keys.map { it.entityId }) return - for (watchableObject in packet.func_149376_c()) { - if (watchableObject.dataValueId == 6) { - val health = watchableObject.`object` as Float - if (health % 10_000_000 != 0F) { - blazeArmorStand.keys.removeIf { it.entityId == packet.entityId } - } - } + if (event.health % 10_000_000 != 0F) { + blazeArmorStand.keys.removeIf { it.entityId == entityId } } } @@ -90,14 +83,13 @@ class AshfangBlazes { } @SubscribeEvent - fun onResetEntityHurtTime(event: ResetEntityHurtTimeEvent) { + fun onResetEntityHurtTime(event: ResetEntityHurtEvent) { if (!isEnabled()) return if (!SkyHanniMod.feature.ashfang.highlightBlazes) return val entity = event.entity if (entity in blazeColor) { event.shouldReset = true } - } @SubscribeEvent(priority = EventPriority.HIGH) -- cgit