Skip to content

Commit

Permalink
Refactor on particle animations
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Jan 13, 2024
1 parent 627b31b commit de8fa6d
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import com.willfp.eco.core.config.interfaces.Config
import com.willfp.eco.core.registry.Registry
import com.willfp.libreforge.ConfigViolation
import com.willfp.libreforge.ViolationContext
import com.willfp.libreforge.effects.impl.particles.impl.AnimationCircle
import com.willfp.libreforge.effects.impl.particles.impl.AnimationDoubleHelix
import com.willfp.libreforge.effects.impl.particles.impl.AnimationGroundSpiral
import com.willfp.libreforge.effects.impl.particles.impl.AnimationHelix
import com.willfp.libreforge.effects.impl.particles.impl.AnimationTrace
import com.willfp.libreforge.effects.impl.particles.impl.AnimationTwirl
import com.willfp.libreforge.effects.impl.particles.impl.ParticleAnimationCircle
import com.willfp.libreforge.effects.impl.particles.impl.ParticleAnimationDoubleHelix
import com.willfp.libreforge.effects.impl.particles.impl.ParticleAnimationGroundSpiral
import com.willfp.libreforge.effects.impl.particles.impl.ParticleAnimationHelix
import com.willfp.libreforge.effects.impl.particles.impl.ParticleAnimationTrace
import com.willfp.libreforge.effects.impl.particles.impl.ParticleAnimationTwirl

@Suppress("UNUSED")
object ParticleAnimations : Registry<ParticleAnimation<*>>() {
Expand Down Expand Up @@ -47,11 +47,11 @@ object ParticleAnimations : Registry<ParticleAnimation<*>>() {
}

init {
register(AnimationCircle)
register(AnimationDoubleHelix)
register(AnimationGroundSpiral)
register(AnimationHelix)
register(AnimationTrace)
register(AnimationTwirl)
register(ParticleAnimationCircle)
register(ParticleAnimationDoubleHelix)
register(ParticleAnimationGroundSpiral)
register(ParticleAnimationHelix)
register(ParticleAnimationTrace)
register(ParticleAnimationTwirl)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import dev.romainguy.kotlin.math.Float3
import org.bukkit.entity.Player
import kotlin.math.PI

object AnimationCircle : ParticleAnimation<NoCompileData>("circle") {
object ParticleAnimationCircle : ParticleAnimation<NoCompileData>("circle") {
override val arguments = arguments {
require("radius", "You must specify the radius!")
require("duration", "You must specify the duration!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import dev.romainguy.kotlin.math.Float3
import org.bukkit.entity.Player
import kotlin.math.PI

object AnimationDoubleHelix : ParticleAnimation<NoCompileData>("double_helix") {
object ParticleAnimationDoubleHelix : ParticleAnimation<NoCompileData>("double_helix") {
override val arguments = arguments {
require("height", "You must specify the height!")
require("duration", "You must specify the duration!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import kotlin.math.PI
import kotlin.math.cos
import kotlin.math.sin

object AnimationGroundSpiral : ParticleAnimation<NoCompileData>("ground_spiral") {
object ParticleAnimationGroundSpiral : ParticleAnimation<NoCompileData>("ground_spiral") {
override val arguments = arguments {
require("scalar", "You must specify the scalar!")
require("distance-scalar", "You must specify the distance scalar!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import dev.romainguy.kotlin.math.Float3
import org.bukkit.entity.Player
import kotlin.math.PI

object AnimationHelix : ParticleAnimation<NoCompileData>("helix") {
object ParticleAnimationHelix : ParticleAnimation<NoCompileData>("helix") {
override val arguments = arguments {
require("height", "You must specify the height!")
require("duration", "You must specify the duration!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import dev.romainguy.kotlin.math.Float2
import dev.romainguy.kotlin.math.Float3
import org.bukkit.entity.Player

object AnimationTrace : ParticleAnimation<NoCompileData>("trace") {
object ParticleAnimationTrace : ParticleAnimation<NoCompileData>("trace") {
override val arguments = arguments {
require("spacing", "You must specify the spacing!")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import dev.romainguy.kotlin.math.Float3
import org.bukkit.entity.Player
import kotlin.math.PI

object AnimationTwirl : ParticleAnimation<NoCompileData>("twirl") {
object ParticleAnimationTwirl : ParticleAnimation<NoCompileData>("twirl") {
override val arguments = arguments {
require("small-radius", "You must specify the small radius!")
require("large-radius", "You must specify the large radius!")
Expand Down

0 comments on commit de8fa6d

Please sign in to comment.