libFirework

libFirework

A Minecraft library to create custom fireworks

by
235 Downloads
fabriclibraryutility
Rent Server with this Mod

About this Mod

libFirework

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

drawing

If you want to use custom svgs, you can use the CustomRocketTypeBuilder.explodeSvg(). To do this, you have to supply it with an input stream of the svg. The svg should only contain one path and it should be the first child of the root. You also have to supply pointDistance, scale, and origin. The pointDistance regulate the number of particles that are generated. The scale and origin define how big the svg is drawn and what direction it moves to.

Available Versions

libFirework v1.0.0release
MC 1.19, 1.19.1, 1.19.2, 1.19.3fabric
December 14, 2022

How to Install libFirework on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.19.3).

3

Install Mod

Open the mod browser in the dashboard and search for "libFirework". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.19.3, 1.19.2, 1.19.1 (+1 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

libFirework server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.19.3). You can switch loaders with one click in the panel.

Is libFirework compatible with fabric?

libFirework officially supports fabric for Minecraft 1.19.3, 1.19.2, 1.19.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with libFirework – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if libFirework consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install libFirework with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
LicenseRef-All-Rights-Reserved
Server-side
Required

Supported Versions

1.19.31.19.21.19.11.19