Back to mods
StargazerLib project artwork

Modrinth · Minecraft mod

StargazerLib

Library for rendering entities that support GLB models and animations, inspired by GeckoLib's interface.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which StargazerLib release should I use?

Updated 4 months ago
alpha file 0.1.0
Game version 1.18.2
Loader Forge

StargazerLib 0.1.0 targets 1.18.2 with Forge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is StargazerLib required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release Forge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does StargazerLib 0.1.0 need?

0.1.0. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add StargazerLib without breaking your instance.

Built for StargazerLib 0.1.0. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.1.0. It targets 1.18.2 with Forge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.1.0. It opens that exact file at the source.

About this project

What does StargazerLib add?

It is a HUGE WIP, but i'll get there eventually. The docs and wiki are yet to be published too.

Description

StargazerLib is a library that renders and animates glTF / GLB models directly on Minecraft entities, with their skeleton, animations and textures.

In short: it's like GeckoLib, but for real meshes instead of cubes.

It was born out of a simple frustration: GeckoLib only renders cubes. When your artists work in Blender and hand you low-poly models, your options are bad ones.

  • Why voxelize a clean low-poly model, when that makes it both uglier and heavier than the original ?
  • Why rebuild an entire model by hand in Blockbench, when it already exists as a .glb ?
  • Why lose your skeleton, your animations and your textures on the way in ?

StargazerLib takes the other route: it loads the .glb as-is and renders the actual mesh through Minecraft's own pipeline, so lighting and shaders keep working. Skinning, animation clips (with cross-fading between them), textures and auto-scaling are all handled for you.

It is meant to be used by other mods much like GeckoLib, but you keep the Blender workflow your artists already use.

For developers

Drop your model in assets/<modid>/models/entity/<name>.glb, then have your entity declare it:

public class Dragon extends Entity implements GltfAnimatable {

    public ResourceLocation getGltfModel() {
        return new ResourceLocation("mymod", "dragon");
    }

    public float getGltfSize() {
        return 2.0f; // ~2 blocks on the largest dimension
    }

    public void registerControllers(ControllerRegistrar registrar) {
        registrar.add(new AnimationController<>("main",
                state -> state.isMoving() ? "fly" : "idle"));
    }
}

Then register the provided generic renderer:

event.registerEntityRenderer(DRAGON_TYPE, GltfEntityRenderer::new);

That's it, the Blender model shows up on your entity, animated and textured. Two demo entities (stargazerlib:gltf_test and stargazerlib:gltf_dragon) are included so you can see it in-game.

Project description from Modrinth.

Pick your setup

StargazerLib by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

StargazerLib versions and loaders

1 of 1 releases match

Looking for an older file? The official Modrinth project page is in Resources.