aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-30 23:14:39 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-30 23:14:39 +0200
commit64fa75da3342d3c7abf976b630c3b9657163c07e (patch)
tree8168c27a855a2dbb128e5453445c7ecf631304cc /src/main/java/at/hannibal2/skyhanni/features
parentbda14ba51d59cd841bb28a81f11b9d96f55977fa (diff)
downloadSkyHanni-64fa75da3342d3c7abf976b630c3b9657163c07e.tar.gz
SkyHanni-64fa75da3342d3c7abf976b630c3b9657163c07e.tar.bz2
SkyHanni-64fa75da3342d3c7abf976b630c3b9657163c07e.zip
hide blaze particles next to ashfang
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt
index 419f82486..c6c5f8786 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.nether.ashfang
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.events.BlazeParticleEvent
import at.hannibal2.skyhanni.events.PlayParticleEvent
import at.hannibal2.skyhanni.features.damageindicator.BossType
import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager
@@ -11,10 +12,18 @@ class AshfangHideParticles {
@SubscribeEvent
fun onReceivePacket(event: PlayParticleEvent) {
- if (LorenzUtils.inSkyblock && SkyHanniMod.feature.ashfang.hideParticles &&
- DamageIndicatorManager.isBossSpawned(BossType.NETHER_ASHFANG)
- ) {
+ if (isEnabled()) {
event.isCanceled = true
}
}
+
+ @SubscribeEvent
+ fun onBlazeParticle(event: BlazeParticleEvent) {
+ if (isEnabled()) {
+ event.isCanceled = true
+ }
+ }
+
+ private fun isEnabled() = LorenzUtils.inSkyblock && SkyHanniMod.feature.ashfang.hideParticles &&
+ DamageIndicatorManager.isBossSpawned(BossType.NETHER_ASHFANG)
} \ No newline at end of file