Load Emotecraft emotes into a registry and add a whole-player bone
- core: EmotecraftLoader reads Emotecraft / player-animation-lib JSON into a KeyframeAnimation (per-channel keyframes with Easing), following player-animation-lib's reader: absolute pivots become offsets, body (and torso before version 3) is the whole player in blocks, angles are degrees unless "degrees": false, turn adds whole turns, and loops jump back to returnTick after endTick. Emote and EmoteRegistry hold emotes by ID with their name, description and author. Animation.loopStart lets loops restart after an intro. Uses Jackson 2.17.0, the version Saturn Client ships. - Bone.ROOT moves the whole player around its middle (0.7 blocks above the feet), through the model's root part, so armor and held items follow. - fabric: Emotes.registry() and Emotes.play(uuid, id). Core and Jackson are bundled in the jar. - testmod: loads Saturn's six emotes into the library's registry (/emotes play), and keeps its test animations in a separate registry (/emotes test). The gametest shoots the loaded emotes too. Blending with the vanilla pose is issue #4. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+5
-1
@@ -70,9 +70,13 @@ dependencies {
|
||||
modImplementation("net.fabricmc:fabric-loader:${property("deps.fabric_loader")}")
|
||||
fapi("fabric-api-base", "fabric-lifecycle-events-v1")
|
||||
|
||||
// The core is Minecraft-independent; ship it inside the mod jar.
|
||||
// The core is Minecraft-independent; ship it inside the mod jar, with the Jackson it reads emotes
|
||||
// with (the version Saturn Client ships too, so the game only loads one).
|
||||
api(project(":core"))
|
||||
include(project(":core"))
|
||||
for (module in listOf("jackson-databind", "jackson-core", "jackson-annotations")) {
|
||||
include("com.fasterxml.jackson.core:$module:2.17.0")
|
||||
}
|
||||
|
||||
for (module in listOf("fabric-command-api-v2", "fabric-client-gametest-api-v1")) {
|
||||
"modTestmodImplementation"(fabricApi.module(module, sc.properties["deps.fabric_api"]))
|
||||
|
||||
Reference in New Issue
Block a user