Download ParticleAnimationLib — Minecraft Mods — MetaMods
ParticleAnimationLib

ParticleAnimationLib

Active

Downloads

0

Last update

3 months ago

Versions

1.17 — 1.21.7
Server
Fabric
Quilt
Decor
Libraries
Magic
Utils

ParticleAnimationLib

Do you want to create impressive particle effects like cones, cubes, spheres, and vortices but don't know how? This mod is your perfect solution! While it's primarily designed for developers, regular players can also experiment with effects through commands to evaluate their capabilities before programmatic implementation. The mod is completely server-side, so client installation is not required. The creation was inspired by the EffectLib plugin.

Available Effects

Currently available particle animations include:

  • 3D Effects: Animated sphere, regular sphere, cuboid, vortex, cone, torus
  • 2D Effects: Arc, line, animated circle, colored and black-and-white images, text

Note: The mod is in beta testing stage, so minor changes and errors are possible. Some effects are still under development. A version for Forge/NeoForge may appear in the future, but the Fabric/Quilt version is planned to be completed first.

Demonstration of some effects from version 0.0.1

Demonstration of some effects from version 0.0.1

Usage for Players

To work with effects through commands, you need to install the additional mod ParticleAnimationLibCommands. Commands may seem complex, so it's recommended to check the wiki for better understanding.

Creating Effects for Developers

All effects are located in the effects package. You can create new effects either through the constructor or using the builder method, similar to block properties.

Usage example:

// Constructor pseudocode with runFor method
Effect effect = new Effect(ServerWorld world, ParticleEffect effect, Vec3d originPos, int particles, Other parameters...)
effect.runFor(5);

// Builder pseudocode with run and setIterations methods (20 ticks = 1 second)
Effect effect = Effect.builder(ServerWorld world, ParticleEffect effect, Vec3d originPos).particles(10).anotherOption(true).build;
effect.setIterations(5*20);
effect.run();

Important: When using the builder, you must always specify the world, particle effect, and origin position, as all animation effects require these parameters for proper operation.

Managing Animation Effects

Each effect has its own getters and setters that allow changing settings before launch. You can also pass a lambda expression that will execute every tick the effect is active. For detailed parameter information, see the javadoc of the corresponding effect's constructor.

Commands

To use commands, you need to install the additional mod ParticleAnimationLibCommands. Use the pal or particleanimationlib commands with autocompletion to create effects. For effect previews, use /pal <effect> demo <particle> <pos>.

For Developers

Add the library as a dependency in your build.gradle:

repositories {
    maven {
        name = "Modrinth"
        url = "https://api.modrinth.com/maven"
        content {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modImplementation "maven.modrinth:particleanimationlib:"
}

Version number can be found on the Modrinth versions page.

Acknowledgments

This mod is based on the EffectLib plugin by the elBukkit team. Effects are taken from there and adapted for modding with additional functionality added.

License

The library is distributed under MIT license

Project members
Emafire003

Emafire003

Developer

Created: 22 Apr 2024

ID: 7438