HomeJavaModsCraft-Animation
Craft-Animation
ModsJava

Craft-Animation

by skushot9723 · on Modrinth

A reusable Forge animation library with JSON clips, keyframes, easing, and runtime controllers. Free Minecraft Java mod for 26.1.2.

⬇ Download on Modrinth

Craft Animation

Craft Animation is a reusable animation library for Forge mod development.

This is not a content mod that directly adds weapons, mobs, or gameplay systems on its own. Instead, it provides a shared animation foundation that other mods can use to load, play, sample, and apply animations in a consistent way. The goal is to support players, mobs, generic entities, blocks, block entities, items, and display-based render objects through one common runtime structure.

Supported targets

Included systems

Supported formats Craft Animation is designed around two main input paths:

That means you can either author your own clip format directly or reuse existing player animation data structures as part of your pipeline.

How to connect and use it in your mod This library is meant to be connected to your own renderer, model, or gameplay code. It does not automatically inject finished animations into every vanilla render path by itself. The normal workflow looks like this:

1. Create an animation JSON file Example location:

assets/yourmod/animations/guardian_idle.json

You can use the built-in example file as a reference:

assets/craftanimation/animations/example_idle.json

2. Load and register the clip Use AnimationLibrary through CraftAnimationApi.library().

AnimationClip clip = CraftAnimationApi.library().loadBuiltin(
    "assets/yourmod/animations/guardian_idle.json",
    getClass().getClassLoader()
);

If the clip is already registered, you can fetch it later with:

AnimationClip clip = CraftAnimationApi.library().require("yourmod:guardian_idle");

3. Create an animation subject key The runtime keeps separate animation state for each subject through AnimationSubjectKey.

Player example:

AnimationSubjectKey key = AnimationSubjectKey.player(
    level.dimension().location().toString(),
    player.getUUID()
);

Mob example:

AnimationSubjectKey key = AnimationSubjectKey.mob(
    level.dimension().location().toString(),
    mob.getUUID()
);

Block entity example:

AnimationSubjectKey key = AnimationSubjectKey.blockEntity(
    level.dimension().location().toString(),
    pos.getX(), pos.getY(), pos.getZ()
);

4. Start playback

CraftAnimationApi.runtime().play(key, clip);

You can also access the controller directly and change playback speed:

CraftAnimationApi.runtime().controller(key).setSpeed(1.25F);

5. Advance the animation every tick

CraftAnimationApi.runtime().tick(key, deltaTicks);

Or update every active controller at once:

CraftAnimationApi.runtime().tickAll(deltaTicks);

6. Sample the current pose

AnimationPose pose = CraftAnimationApi.runtime().sample(key);

The sampled AnimationPose is what you apply inside your own player renderer, entity model, block entity renderer, custom item renderer, or display rendering logic.

In short, the normal usage flow is:

Typical use cases

Notes

Intended users

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more