From 46e64e85b65d3a6d896f352a7b9de8323870c96d Mon Sep 17 00:00:00 2001 From: inglettronald Date: Sun, 16 Jul 2023 07:11:23 -0500 Subject: Explosion Particles Culling Option --- .../dulkirfabric/features/CullExplosionParticles.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt (limited to 'src/main/kotlin/com/dulkirfabric/features') diff --git a/src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt b/src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt new file mode 100644 index 0000000..8c034b6 --- /dev/null +++ b/src/main/kotlin/com/dulkirfabric/features/CullExplosionParticles.kt @@ -0,0 +1,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() + } + } +} \ No newline at end of file -- cgit