Log cleanup:
- Drop redundant INFO "Gravity Flip enabled" in setup() (substantive version at
start() remains as the single startup line).
- Drop INFO "debug enter/exit notifier ENABLED" (the notifier itself emits per
region transition; extra startup noise not needed).
- Remove dead back-compat GravityApplier ctors that accepted an infoHandler
Consumer (no callers post-03-06; debug logs already stripped).
- Clean stale javadoc referencing removed [DBG npc.woken]/[DBG npc.ctrlNull]
one-shot logs.
- Also ship the pre-staged cleanup work: RegionEnterNotifier gated behind
GRAVITYFLIP_DEBUG_NOTIFY env var, GravityApplier infoHandler field removed,
tick logs stripped.
Efficiency:
- RegionVisualizer.resolveParticleId now memoises the requested->resolved
mapping in a ConcurrentHashMap, eliminating the ParticleSystem.getAssetMap()
lookup on every tick emission per region. Warn-once semantics preserved via
warnedInvalidIds. Fail-open path (AssetMap unavailable in tests) intentionally
does not populate the cache.
- Document in GravityApplier javadoc why Pass 1 + Pass 2 cannot be fused:
restore requires the complete currentlyInRegion set before diffing against
previouslyInverted.
Considered but not applied:
- ParticleEdgeEmitter.edgePoints caching per (box, density): throttled to
>=100ms refresh and typical <20 regions => alloc pressure negligible;
premature without measurement.
- Reusing RegionRegistry snapshot in RegionEnterNotifier: notifier is
opt-in/off-by-default, so its independent ECS scan has zero prod cost.
Tests: ./gradlew clean build green, no test changes required.
- GravityApplier.apply dispatche via world.execute(Runnable) pour satisfaire assertThread de Store.forEachEntityParallel
- PASS 1, PASS 2 et update tracker exécutés dans le même Runnable (cohérence intra-tick)
- Null-guards conservés avant le dispatch
- Amendement D-04 du plan 03-01 : world.execute requis côté initiation
- Service GravityApplier qui toggle PhysicsValues.invertedGravity via CommandBuffer.replaceComponent
- Thread-safe tracker ConcurrentHashMap.newKeySet<UUID> pour dedup entre ticks
- Second pass O(N) pour restaurer la gravité à la sortie de région (trade-off v1 documenté)
- Pure diff static helper + hooks package-private pour tests unitaires sans runtime Hytale
- 6 tests verts (diff + tracker semantics)