diff options
Diffstat (limited to 'src/main/kotlin/features/fixes/CompatibliltyFeatures.kt')
-rw-r--r-- | src/main/kotlin/features/fixes/CompatibliltyFeatures.kt | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/main/kotlin/features/fixes/CompatibliltyFeatures.kt b/src/main/kotlin/features/fixes/CompatibliltyFeatures.kt deleted file mode 100644 index 76f6ed4..0000000 --- a/src/main/kotlin/features/fixes/CompatibliltyFeatures.kt +++ /dev/null @@ -1,41 +0,0 @@ -package moe.nea.firmament.features.fixes - -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 -import moe.nea.firmament.util.compatloader.CompatLoader - -object CompatibliltyFeatures : FirmamentFeature { - override val identifier: String - get() = "compatibility" - - object TConfig : ManagedConfig(identifier, Category.INTEGRATIONS) { - val enhancedExplosions by toggle("explosion-enabled") { false } - val explosionSize by integer("explosion-power", 10, 50) { 1 } - } - - override val config: ManagedConfig? - get() = TConfig - - interface ExplosiveApiWrapper { - fun spawnParticle(vec3d: Vec3d, power: Float) - - companion object : CompatLoader<ExplosiveApiWrapper>(ExplosiveApiWrapper::class.java) - } - - private val explosiveApiWrapper = ExplosiveApiWrapper.singleInstance - - @Subscribe - fun onExplosion(it: ParticleSpawnEvent) { - if (TConfig.enhancedExplosions && - it.particleEffect.type == ParticleTypes.EXPLOSION_EMITTER && - explosiveApiWrapper != null - ) { - it.cancel() - explosiveApiWrapper.spawnParticle(it.position, 2F) - } - } -} |