From b9af0f20131d686cfa2ac77ce4838af40944b64e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 13 May 2023 13:10:06 +0200 Subject: Disabled hide far particles feature in M7 boss fight. This will fix M7 boss fight features from other mods --- src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt index ad0a02453..befaa09f3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt @@ -2,6 +2,8 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.features.dungeon.DungeonData +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.getLorenzVec import net.minecraft.client.Minecraft import net.minecraft.entity.projectile.EntitySmallFireball @@ -10,11 +12,13 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class ParticleHider { + fun inM7Boss() = LorenzUtils.inDungeons && DungeonData.dungeonFloor == "M7" && DungeonData.inBossRoom + @SubscribeEvent fun onHypExplosions(event: ReceiveParticleEvent) { val distanceToPlayer = event.distanceToPlayer if (SkyHanniMod.feature.misc.hideFarParticles) { - if (distanceToPlayer > 40) { + if (distanceToPlayer > 40 && !inM7Boss()) { event.isCanceled = true return } -- cgit