BUG-RACE-01 : document Phase 2 listener registration ordering
Reviewer flagged race between AnimationManager parsing (LIVING_MOTION_CODEC.getOrThrow) and LivingMotionReloadListener.apply(). Investigation confirmed : - AnimationManager is NOT currently registered as a reload listener (Phase 2 pending) - Forge 1.20.1 has no PreparableReloadListener.getDependencies() — that's a Fabric/NeoForge API - 1.20.1 ordering mechanism = registration list order via SimpleReloadInstance.barrier.wait() Fix : preventive comment in AnimationManager.apply() documenting that when Phase 2 wires this listener, it MUST be registered AFTER LivingMotionReloadListener / ArmatureReloadListener / PoseTypeReloadListener in TiedUpMod.ForgeEvents.onAddReloadListeners + V2ClientSetup.onRegisterReloadListeners. Drive-by : add docs.tar.gz to .gitignore (artist export bundle). No actionable race today — pure documentation hardening.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -47,3 +47,4 @@ logs/
|
|||||||
Thumbs.db
|
Thumbs.db
|
||||||
desktop.ini
|
desktop.ini
|
||||||
docs/
|
docs/
|
||||||
|
docs.tar.gz
|
||||||
|
|||||||
@@ -170,6 +170,20 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
|||||||
// RIG : Armatures.reload() (EF gameasset registry) retiré.
|
// RIG : Armatures.reload() (EF gameasset registry) retiré.
|
||||||
// TiedUpArmatures.reload() sera appelé ici en Phase 2 quand le registry
|
// TiedUpArmatures.reload() sera appelé ici en Phase 2 quand le registry
|
||||||
// sera créé. En Phase 0, no-op.
|
// sera créé. En Phase 0, no-op.
|
||||||
|
//
|
||||||
|
// PHASE 2 LISTENER ORDERING NOTE (BUG-RACE-01 prevention) :
|
||||||
|
// Quand cette classe sera enregistrée comme PreparableReloadListener via
|
||||||
|
// AddReloadListenerEvent (server) + RegisterClientReloadListenersEvent (client),
|
||||||
|
// elle DOIT être enregistrée APRÈS ces 3 listeners qui peuplent les registries
|
||||||
|
// consommés par les codecs de propriétés d'animation :
|
||||||
|
// - LivingMotionReloadListener (pour LIVING_MOTION_CODEC dans AnimationProperty)
|
||||||
|
// - ArmatureReloadListener (pour InstantiateInvoker.getArmature)
|
||||||
|
// - PoseTypeReloadListener (pour les bindings pose type)
|
||||||
|
// MC 1.20.1 SimpleReloadInstance sérialise les apply() dans l'ordre
|
||||||
|
// d'enregistrement de la liste — c'est notre seul levier d'ordering en
|
||||||
|
// Forge 1.20.1 (PreparableReloadListener.getDependencies() n'existe pas
|
||||||
|
// en cette version, c'est une API Fabric/NeoForge).
|
||||||
|
// Sites concernés : TiedUpMod.ForgeEvents.onAddReloadListeners + V2ClientSetup.onRegisterReloadListeners.
|
||||||
|
|
||||||
Set<ResourceLocation> registeredAnimation =
|
Set<ResourceLocation> registeredAnimation =
|
||||||
this.animationById.values().stream()
|
this.animationById.values().stream()
|
||||||
|
|||||||
Reference in New Issue
Block a user