aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt
blob: 8c034b6c8aac33b3ccbad5924546f1963d86857f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.dulkirfabric.features

import com.dulkirfabric.events.AddParticleEvent
import meteordevelopment.orbit.EventHandler
import net.minecraft.client.particle.ExplosionLargeParticle

/**
 * Remove nearby Explosions that would be intrusive visually
 */
object CullExplosionParticles {

    @EventHandler
    fun onParticle(event: AddParticleEvent) {
        val particle = event.particle
        if (particle is ExplosionLargeParticle) {
            event.cancel()
        }
    }
}