Implement datapack armature registry — enable auto-register of anim JSONs
Replace InstantiateInvoker.getArmature() throw with real lookup in TiedUpArmatures registry. This unblocks the datapack auto-register path for anim JSONs placed in assets/tiedup/animmodels/animations/. 5 Phase 3 placeholder JSONs updated with EF-native 'constructor' block — they now auto-register via AnimationManager.readResourcepackAnimation without any Java-side hardcoding. Data-driven pipeline now fully working end-to-end : modder drops a JSON in their datapack's animmodels folder, it's automatically picked up at reload, and referenced via resolveWithFallback() from item bindings. No recompile needed for new items/anims.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
{
|
||||
"_comment": "PLACEHOLDER gameday — oneshot d'équipement pour armbinder (2 keyframes Root, 0.5s non-repeat). Testera le trigger on_equip via PacketPlayRigAnim.handleOnClient + LivingEntityPatch.playAnimationSync. F6 overlay doit montrer une brève spike d'animation HIGH priority au moment de l'équipement, puis retour au base layer IDLE. Remplacement Blender (bras qui se replient derrière le dos) quand dispo.",
|
||||
"_comment_registration": "Même statut que les autres placeholders : résolution vers EMPTY_ANIMATION. La spike visuelle via PacketPlayRigAnim testera le binding du oneshot même si l'effet rendu est nul.",
|
||||
"_comment": "PLACEHOLDER gameday — oneshot d'équipement pour armbinder (2 keyframes Root, 0.5s non-repeat). Testera le trigger on_equip via PacketPlayRigAnim.handleOnClient + LivingEntityPatch.playAnimationSync. F6 overlay doit montrer une brève spike d'animation au moment de l'équipement, puis retour au base layer IDLE. Remplacement Blender (bras qui se replient derrière le dos) quand dispo.",
|
||||
"_comment_registration": "Auto-registered via AnimationManager.readResourcepackAnimation. isRepeat=false (oneshot, joue une seule fois puis layer off).",
|
||||
"_comment_layer_priority": "User decision: HIGH priority + COMPOSITE_LAYER — pas applicable via JSON Phase 2.4 car les properties LAYER_TYPE/PRIORITY ne sont PAS serializable (créées sans name/Codec dans ClientAnimationProperties). Defaults appliqués: BASE_LAYER + LOWEST. Phase future: ajouter des Codec et ré-enregistrer ces StaticAnimationProperty via ctor named pour permettre override JSON.",
|
||||
"constructor": {
|
||||
"invocation_command": "(0.15#F,false#Z,tiedup:armbinder_equip_oneshot#java.lang.String,tiedup:biped#com.tiedup.remake.rig.armature.Armature)#com.tiedup.remake.rig.anim.types.StaticAnimation"
|
||||
},
|
||||
"format": "ATTRIBUTES",
|
||||
"animation": [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"_comment": "PLACEHOLDER gameday — identity idle pour armbinder (2 keyframes Root, 2s loop). Même structure que context_stand_idle.json : le but n'est PAS d'avoir un rendu visuel different mais de valider le pipeline P3-05 end-to-end (binding résolu, anim jouée, F6 overlay 'motion: IDLE, bindings: N'). À remplacer par un export Blender authored (bras derrière le dos, épaules sanglées) quand dispo.",
|
||||
"_comment_registration": "Ce JSON n'est PAS auto-registered dans AnimationManager.animationByName : readResourcepackAnimation exige un bloc 'constructor' absent ici, et InstantiateInvoker.getArmature() throw actuellement (Armature registry pas Phase 2). resolveWithFallback retourne donc EMPTY_ANIMATION, ce qui est OK pour le smoke test du pipeline (la map livingAnimations reçoit bien un accessor, juste vide).",
|
||||
"_comment_armature": "Pas de champ 'armature' ici — le loader ne lit pas ce champ au runtime. L'armature est résolue par le call site.",
|
||||
"_comment": "PLACEHOLDER gameday — identity idle pour armbinder (2 keyframes Root, 2s loop). Le but n'est PAS d'avoir un rendu visuel different mais de valider le pipeline P3-05 end-to-end (binding résolu, anim jouée, F6 overlay 'motion: IDLE, bindings: N'). À remplacer par un export Blender authored (bras derrière le dos, épaules sanglées) quand dispo.",
|
||||
"_comment_registration": "Le bloc 'constructor' ci-dessous fait que AnimationManager.apply auto-register cette anim dans animationByName via readResourcepackAnimation. invocation_command = ctor StaticAnimation(float, boolean, String, Armature) — le String est le registryName (tiedup:armbinder_idle), le Armature est résolu via InstantiateInvoker → TiedUpArmatures.get → BIPED.",
|
||||
"constructor": {
|
||||
"invocation_command": "(0.15#F,true#Z,tiedup:armbinder_idle#java.lang.String,tiedup:biped#com.tiedup.remake.rig.armature.Armature)#com.tiedup.remake.rig.anim.types.StaticAnimation"
|
||||
},
|
||||
"format": "ATTRIBUTES",
|
||||
"animation": [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"_comment": "PLACEHOLDER gameday — struggle bondage pour armbinder (2 keyframes Root, 0.8s loop). Testera le binding de la motion custom TiedUpLivingMotions.STRUGGLE_BOUND. Remplacement Blender (gesticulation limitée bras sanglés) quand dispo.",
|
||||
"_comment_registration": "Auto-registered via AnimationManager.readResourcepackAnimation. isRepeat=true car le struggle tourne en boucle tant que le joueur maintient l'input.",
|
||||
"constructor": {
|
||||
"invocation_command": "(0.15#F,true#Z,tiedup:armbinder_struggle#java.lang.String,tiedup:biped#com.tiedup.remake.rig.armature.Armature)#com.tiedup.remake.rig.anim.types.StaticAnimation"
|
||||
},
|
||||
"format": "ATTRIBUTES",
|
||||
"animation": [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"_comment": "PLACEHOLDER gameday — identity walk pour armbinder (2 keyframes Root, 1s loop). Le but est de tester le switch de motion IDLE→WALK au runtime : F6 overlay doit afficher 'motion: WALK' quand le joueur bouge. Identité visuelle pour l'instant, remplacement Blender-authored (démarche contrainte, épaules raides) quand dispo.",
|
||||
"_comment_registration": "Même statut que armbinder_idle.json : pas de bloc 'constructor' => resolveWithFallback retourne EMPTY_ANIMATION. Valide le switch de motion côté binding map sans besoin d'un StaticAnimation réel.",
|
||||
"_comment_registration": "Auto-registered par AnimationManager.readResourcepackAnimation via le bloc 'constructor' ci-dessous. isRepeat=true (loop walk), transition=0.15s (GENERAL).",
|
||||
"constructor": {
|
||||
"invocation_command": "(0.15#F,true#Z,tiedup:armbinder_walk#java.lang.String,tiedup:biped#com.tiedup.remake.rig.armature.Armature)#com.tiedup.remake.rig.anim.types.StaticAnimation"
|
||||
},
|
||||
"format": "ATTRIBUTES",
|
||||
"animation": [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"_comment": "PLACEHOLDER gameday — identity idle pour classic_collar (NECK region). Apairé avec armbinder_* pour tester le cas multi-item composition : armbinder (ARMS pose_priority 30) + classic_collar (NECK pose_priority 5) doivent tous deux écrire dans la map livingAnimations (pose_priority ASC sort => collar appliqué d'abord, armbinder écrase). F6 overlay doit afficher 'bindings: 2+' quand les deux items sont équipés.",
|
||||
"_comment_registration": "Auto-registered via AnimationManager.readResourcepackAnimation. isRepeat=true (idle loop), 2s boucle.",
|
||||
"constructor": {
|
||||
"invocation_command": "(0.15#F,true#Z,tiedup:classic_collar_idle#java.lang.String,tiedup:biped#com.tiedup.remake.rig.armature.Armature)#com.tiedup.remake.rig.anim.types.StaticAnimation"
|
||||
},
|
||||
"format": "ATTRIBUTES",
|
||||
"animation": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user