selimaj-devandclaude 8641fc0afe Scaffold the emote library with a Stonecutter Fabric mod and tester
- core/: Minecraft-independent animation model (Bone, BoneTransform with
  bend fields, Pose, Animation, AnimationPlayer) with JUnit tests.
- src/main: Fabric mod built for 1.21.4-1.21.11 with Stonecutter on
  Mojang mappings. Samples each player's pose into its render state and
  applies it at the end of HumanoidModel.setupAnim (armor follows too).
- src/testmod: dev-only tester with /emotes play|stop|info and a mixin
  audit on startup.
- Publishing to the saturnclientmc Gitea Maven registry as
  org.saturnclient:emotes-core and emotes-fabric:<v>+<mc>.

Loom is pinned to 1.17 because 1.18 needs a Java 25 JVM.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-26 19:05:06 +02:00
2026-09-26 16:17:34 +00:00

emotes

A player emote library for Saturn Client, with limb bending.

Layout

  • core/: Minecraft-independent animation model (Bone, BoneTransform, Pose, Animation, AnimationPlayer). Plain Java 21 with JUnit tests. Published as org.saturnclient:emotes-core.
  • src/main/: the Fabric mod that puts poses on player models. It's built once per Minecraft version with Stonecutter and published as org.saturnclient:emotes-fabric:<version>+<mc>, with core bundled inside the jar.
  • src/testmod/: a dev-only tester mod that is never published. It adds /emotes play <name>, /emotes stop and /emotes info. Press F5 to see yourself.

Supported versions: 1.21.4 to 1.21.11, the same range as Saturn Client. Each version's Fabric API version is set in stonecutter.properties.toml. The code uses Mojang mappings.

How it hooks in

  1. LivingEntityRendererMixin samples the entity's current pose into its render state (players only).
  2. HumanoidModelMixin applies that pose at the end of HumanoidModel.setupAnim. PlayerModel and the armor layers both go through this method, so armor follows the pose.

Both hook points exist unchanged in every supported version. Version-specific code goes behind Stonecutter comments:

//? if >=1.21.9 {
import net.minecraft.client.renderer.entity.state.AvatarRenderState;
//?} else
/*import net.minecraft.client.renderer.entity.state.PlayerRenderState;*/

Bending (BoneTransform.bend / bendAxis) is part of the model but isn't rendered yet.

Commands

./gradlew :core:test                      # core unit tests
./gradlew :1.21.11:runTestmodClient       # launch the game with the tester (run dir: ./run)
./gradlew :1.21.4:compileTestmodJava      # quick compile check for one version
./gradlew buildAll                        # every version's jar → build/libs/<version>/
GITEA_TOKEN=... ./gradlew publish         # publish core + every version to Gitea

The active version is set in stonecutter.gradle.kts (stonecutter active "..."), and it's the version whose code is uncommented in src/. Switch versions with the Stonecutter IntelliJ plugin or the Set active project to <v> Gradle task. Run Reset active project before committing, so the tree is committed with vcsVersion (1.21.11) active.

Loom 1.18 needs a Java 25 JVM to run Gradle, so the build is pinned to Loom 1.17 until the toolchain moves. Minecraft 26.x will need that upgrade.

Publishing

Artifacts go to the saturnclientmc organization's Maven registry: https://git.selimaj.dev/api/packages/saturnclientmc/maven. Use a token with package:write, set as GITEA_TOKEN or -PgiteaToken=....

S
Description
A powerful emote library for Saturn Client, with bending
Readme Apache-2.0
242 KiB
Languages
Java 57.4%
Python 40.9%
JavaScript 1.7%