diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/features/fixes/CompatibliltyFeatures.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/fixes/CompatibliltyFeatures.kt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/fixes/CompatibliltyFeatures.kt b/src/main/kotlin/moe/nea/firmament/features/fixes/CompatibliltyFeatures.kt index d3029d8..041e9f3 100644 --- a/src/main/kotlin/moe/nea/firmament/features/fixes/CompatibliltyFeatures.kt +++ b/src/main/kotlin/moe/nea/firmament/features/fixes/CompatibliltyFeatures.kt @@ -10,6 +10,7 @@ import net.fabricmc.loader.api.FabricLoader import net.superkat.explosiveenhancement.api.ExplosiveApi import net.minecraft.particle.ParticleTypes import net.minecraft.util.math.Vec3d +import moe.nea.firmament.annotations.Subscribe import moe.nea.firmament.events.ParticleSpawnEvent import moe.nea.firmament.features.FirmamentFeature import moe.nea.firmament.gui.config.ManagedConfig @@ -41,15 +42,14 @@ object CompatibliltyFeatures : FirmamentFeature { ExplosiveApiWrapperImpl() } else null - override fun onLoad() { - ParticleSpawnEvent.subscribe { - if (TConfig.enhancedExplosions && - it.particleEffect.type == ParticleTypes.EXPLOSION_EMITTER && - explosiveApiWrapper != null - ) { - it.cancel() - explosiveApiWrapper.spawnParticle(it.position, 2F) - } + @Subscribe + fun onExplosion(it: ParticleSpawnEvent) { + if (TConfig.enhancedExplosions && + it.particleEffect.type == ParticleTypes.EXPLOSION_EMITTER && + explosiveApiWrapper != null + ) { + it.cancel() + explosiveApiWrapper.spawnParticle(it.position, 2F) } } } |