Platform-independent Bedrock animation engine library. Extracted from ViaBedrockUtility for shared use between client-side mods and server-side proxies.
BedrockMotion provides a complete Bedrock entity animation pipeline with zero Minecraft client dependencies:
- Animation Engine — Keyframe interpolation, blend weights, MoLang-driven conditional playback
- Animation Controllers — State machine with transitions, blend curves, shortest-path blending
- Render Controllers — MoLang-based geometry/texture/material selection
- Resource Pack Parsing — Load animations, controllers, models, and render controllers from Bedrock
.mcpackfiles - MoLang Engine — Cached parsing and evaluation with
LayeredScope/OverlayBindingfor performance
┌─────────────────────────────────────────────────────┐
│ BedrockMotion │
│ net.easecation.bedrockmotion │
│ │
│ model/ IBoneTarget, IBoneModel interfaces │
│ animator/ Animation execution (Animator) │
│ controller/ Animation controller state machine │
│ render/ Render controller evaluator │
│ mocha/ MoLang engine wrapper │
│ pack/ Resource pack parsing (PackManager) │
│ animation/ Data models + keyframe interpolation │
└────────────┬────────────────────────┬────────────────┘
│ │
┌─────────▼─────────┐ ┌─────────▼─────────┐
│ ViaBedrockUtility │ │ ViaBedrock │
│ (Client Mod) │ │ (Proxy) │
│ │ │ │
│ MC ModelPart │ │ SimpleBone │
│ adapter │ │ adapter │
└────────────────────┘ └────────────────────┘
repositories {
mavenLocal()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'net.easecation:bedrock-motion:1.0.0'
}public class MyBone implements IBoneTarget {
// Implement rotation, offset, scale storage
}
public class MyBoneModel implements IBoneModel {
// Implement bone index and reset
}// Load packs
Content content = new Content(zipBytes);
PackManager packManager = new PackManager(List.of(content));
// Create animator
AnimationDefinitions.AnimationData animData = packManager.getAnimationDefinitions()
.getAnimations().get("animation.entity.idle");
Animator animator = new Animator(eventListener, animData);
// Each tick
animator.setBaseScope(frameScope);
boneModel.resetAllBones();
animator.animate(boneModel);./gradlew build
./gradlew publishToMavenLocalRequires Java 17+.
| Library | Purpose |
|---|---|
| mocha | MoLang parser and runtime |
| CubeConverter | Bedrock geometry/entity data models |
| JOML | Math (vectors, matrices, quaternions) |
| Gson | JSON parsing |
GPL-3.0 — see ViaBedrock for upstream license.