Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Json Entity Animation

Json Entity Animation

Library mod for creating your entity animations in JSON

926
3
Library

Compatibility

Minecraft: Java Edition

1.20–1.20.1
1.19.4
1.19.2

Platforms

Fabric
Quilt

Supported environments

Client-side

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source

Creators

Gaming32
Gaming32 Owner

Details

Licensed MIT
Published 2 years ago
Updated last year
DescriptionChangelogVersions

Json Entity Animation

Json Entity Animation (JsonEA) for short is a library mod for other mods to be able to define animations through JSON instead of through code. A Blockbench plugin (also available in the Blockbench plugins browser) is also provided in order to export your animations to this format.

For developers

Add the mod as a dependency using the Modrinth Maven.

dependencies {
    include(modImplementation("maven.modrinth:json-entity-animation:0.2.1+1.19.4"))
}

Once added, put your animation JSONs in the assets/modid/jsonea directory. To load the animations, your entity model must subclass SinglePartEntityModel/HierarchicalModel. Then define a JsonAnimator field and animation IDs.

public class MyEntityModel extends SinglePartEntityModel<MyEntity> {
    private static final Identifier PUNCH_ANIMATION = new Identifier("modid", "my_entity/punch");
    
    private final JsonAnimator animator = new JsonAnimator(this);
    
    // ...
    
    @Override
    public void setAngles(MyEntity entity, float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch) {
        getPart().traverse().forEach(ModelPart::resetTransform);
        animator.animate(entity.punchState, PUNCH_ANIMATION, animationProgress);
    }
}

Modrinth is open source.

main@396f737

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.