Refactor V2 animation, furniture, and GLTF rendering #21

Merged
NotEvil merged 1 commits from refactor/v2-animation-hardening into develop 2026-04-18 22:26:59 +00:00
Owner

Broad consolidation of the V2 bondage-item, furniture-entity, and
client-side GLTF pipeline.

Parsing and rendering

  • Shared GLB parsing helpers consolidated into GlbParserUtils
    (accessor reads, weight normalization, joint-index clamping,
    coordinate-space conversion, animation parse, primitive loop).
  • Grow-on-demand Matrix4f[] scratch pool in GltfSkinningEngine and
    GltfLiveBoneReader — removes per-frame joint-matrix allocation
    from the render hot path.
  • emitVertex helper dedups three parallel loops in GltfMeshRenderer.
  • TintColorResolver.resolve has a zero-alloc path when the item
    declares no tint channels.
  • itemAnimCache bounded to 256 entries (access-order LRU) with
    atomic get-or-compute under the map's monitor.

Animation correctness

  • First-in-joint-order wins when body and torso both map to the
    same PlayerAnimator slot; duplicate writes log a single WARN.
  • Multi-item composites honor the FullX / FullHeadX opt-in that
    the single-item path already recognized.
  • Seat transforms converted to Minecraft model-def space so
    asymmetric furniture renders passengers at the correct offset.
  • GlbValidator: IBM count / type / presence, JOINTS_0 presence,
    animation channel target validation, multi-skin support.

Furniture correctness and anti-exploit

  • Seat assignment synced via SynchedEntityData (server is
    authoritative; eliminates client-server divergence on multi-seat).
  • Force-mount authorization requires same dimension and a free
    seat; cross-dimension distance checks rejected.
  • Reconnection on login checks for seat takeover before re-mount
    and force-loads the target chunk for cross-dimension cases.
  • tiedup_furniture_lockpick_ctx carries a session UUID nonce so
    stale context can't misroute a body-item lockpick.
  • tiedup_locked_furniture survives death without keepInventory
    (Forge 1.20.1 does not auto-copy persistent data on respawn).

Lifecycle and memory

  • EntityCleanupHandler fans EntityLeaveLevelEvent out to every
    per-entity state map on the client.
  • DogPoseRenderHandler re-keyed by UUID (stable across dimension
    change; entity int ids are recycled).
  • PetBedRenderHandler, PlayerArmHideEventHandler, and
    HeldItemHideHandler use receiveCanceled + sentinel sets so
    Pre-time mutations are restored even when a downstream handler
    cancels the render.

Tests

  • JUnit harness with 76+ tests across GlbParserUtils, GltfPoseConverter,
    FurnitureSeatGeometry, and FurnitureAuthPredicate.
Broad consolidation of the V2 bondage-item, furniture-entity, and client-side GLTF pipeline. Parsing and rendering - Shared GLB parsing helpers consolidated into GlbParserUtils (accessor reads, weight normalization, joint-index clamping, coordinate-space conversion, animation parse, primitive loop). - Grow-on-demand Matrix4f[] scratch pool in GltfSkinningEngine and GltfLiveBoneReader — removes per-frame joint-matrix allocation from the render hot path. - emitVertex helper dedups three parallel loops in GltfMeshRenderer. - TintColorResolver.resolve has a zero-alloc path when the item declares no tint channels. - itemAnimCache bounded to 256 entries (access-order LRU) with atomic get-or-compute under the map's monitor. Animation correctness - First-in-joint-order wins when body and torso both map to the same PlayerAnimator slot; duplicate writes log a single WARN. - Multi-item composites honor the FullX / FullHeadX opt-in that the single-item path already recognized. - Seat transforms converted to Minecraft model-def space so asymmetric furniture renders passengers at the correct offset. - GlbValidator: IBM count / type / presence, JOINTS_0 presence, animation channel target validation, multi-skin support. Furniture correctness and anti-exploit - Seat assignment synced via SynchedEntityData (server is authoritative; eliminates client-server divergence on multi-seat). - Force-mount authorization requires same dimension and a free seat; cross-dimension distance checks rejected. - Reconnection on login checks for seat takeover before re-mount and force-loads the target chunk for cross-dimension cases. - tiedup_furniture_lockpick_ctx carries a session UUID nonce so stale context can't misroute a body-item lockpick. - tiedup_locked_furniture survives death without keepInventory (Forge 1.20.1 does not auto-copy persistent data on respawn). Lifecycle and memory - EntityCleanupHandler fans EntityLeaveLevelEvent out to every per-entity state map on the client. - DogPoseRenderHandler re-keyed by UUID (stable across dimension change; entity int ids are recycled). - PetBedRenderHandler, PlayerArmHideEventHandler, and HeldItemHideHandler use receiveCanceled + sentinel sets so Pre-time mutations are restored even when a downstream handler cancels the render. Tests - JUnit harness with 76+ tests across GlbParserUtils, GltfPoseConverter, FurnitureSeatGeometry, and FurnitureAuthPredicate.
NotEvil added 1 commit 2026-04-18 22:26:49 +00:00
Broad consolidation of the V2 bondage-item, furniture-entity, and
client-side GLTF pipeline.

Parsing and rendering
  - Shared GLB parsing helpers consolidated into GlbParserUtils
    (accessor reads, weight normalization, joint-index clamping,
    coordinate-space conversion, animation parse, primitive loop).
  - Grow-on-demand Matrix4f[] scratch pool in GltfSkinningEngine and
    GltfLiveBoneReader — removes per-frame joint-matrix allocation
    from the render hot path.
  - emitVertex helper dedups three parallel loops in GltfMeshRenderer.
  - TintColorResolver.resolve has a zero-alloc path when the item
    declares no tint channels.
  - itemAnimCache bounded to 256 entries (access-order LRU) with
    atomic get-or-compute under the map's monitor.

Animation correctness
  - First-in-joint-order wins when body and torso both map to the
    same PlayerAnimator slot; duplicate writes log a single WARN.
  - Multi-item composites honor the FullX / FullHeadX opt-in that
    the single-item path already recognized.
  - Seat transforms converted to Minecraft model-def space so
    asymmetric furniture renders passengers at the correct offset.
  - GlbValidator: IBM count / type / presence, JOINTS_0 presence,
    animation channel target validation, multi-skin support.

Furniture correctness and anti-exploit
  - Seat assignment synced via SynchedEntityData (server is
    authoritative; eliminates client-server divergence on multi-seat).
  - Force-mount authorization requires same dimension and a free
    seat; cross-dimension distance checks rejected.
  - Reconnection on login checks for seat takeover before re-mount
    and force-loads the target chunk for cross-dimension cases.
  - tiedup_furniture_lockpick_ctx carries a session UUID nonce so
    stale context can't misroute a body-item lockpick.
  - tiedup_locked_furniture survives death without keepInventory
    (Forge 1.20.1 does not auto-copy persistent data on respawn).

Lifecycle and memory
  - EntityCleanupHandler fans EntityLeaveLevelEvent out to every
    per-entity state map on the client.
  - DogPoseRenderHandler re-keyed by UUID (stable across dimension
    change; entity int ids are recycled).
  - PetBedRenderHandler, PlayerArmHideEventHandler, and
    HeldItemHideHandler use receiveCanceled + sentinel sets so
    Pre-time mutations are restored even when a downstream handler
    cancels the render.

Tests
  - JUnit harness with 76+ tests across GlbParserUtils, GltfPoseConverter,
    FurnitureSeatGeometry, and FurnitureAuthPredicate.
NotEvil merged commit 8b7bf61325 into develop 2026-04-18 22:26:59 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NotEvil/TiedUp-#21