Compatibility
Minecraft: Java Edition
1.19–1.19.3
Platforms
Fabric
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Creators
Details
Licensed ARR
Published last year
Updated last year
libFirework
A Minecraft library to create custom fireworks. What used to be a simple shitpost about amogus in minecraft evolved into this.How to use
To use the library, just add it as a gradle dependency
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
}
dependencies {
...
modImplementation 'maven.modrinth:libfirework:1.0.0'
}
Then you can register CustomRocketTypes
using com.github.libfirework.LibFirework.registerCustomRocketType()
. If you don't want to implement a CustomRocketTypes
all by yourself you should really use com.github.libfirework.types.simple.CustomRocketTypeBuilder
. You can use it like this
@Override
public void onInitialize() {
LibFirework.registerCustomRocketType(new CustomRocketTypeBuilder(new Identifier("libfirework", "triangle"), Items.NETHERITE_INGOT).drawLines(new double[][]{{0.0, 1.0}, {1.0, 0.0}, {-1.0, 0.0}, {0.0, 1.0}}, 50).build());
LibFirework.registerCustomRocketType(new CustomRocketTypeBuilder(new Identifier("libfirework", "ball"), Items.SNOWBALL).fillBall(5, 1).build());
LibFirework.registerCustomRocketType(new CustomRocketTypeBuilder(new Identifier("libfirework", "burst"), Items.FIRE_CHARGE).burst(100).build());
LibFirework.registerCustomRocketType(new CustomRocketTypeBuilder(new Identifier("libfirework", "amogus"), Items.REDSTONE).explodeSvg(TestLibfirework.class.getClassLoader().getResourceAsStream("amogus.svg"), "amogus.svg", 5.f, 1/500.f, new float[]{-0.8f, 1.f}).build());
}
These examples are used straight from here
Custom svgs