Polish V2 subsystem: lockpick kinds, package boundaries, client extractions #22

Merged
NotEvil merged 1 commits from refactor/v2-polish into develop 2026-04-19 00:06:55 +00:00
Owner

Architectural debt cleanup on top of the earlier V2 hardening pass.

Minigame:

  • LockpickMiniGameState splits the overloaded targetSlot int into a
    LockpickTargetKind enum + targetData int. Body-vs-furniture
    dispatch is now a simple enum check; the NBT-tag nonce it
    previously depended on is gone, along with the AIOOBE risk at
    BodyRegionV2.values()[targetSlot].
  • PacketLockpickAttempt.handleFurnitureLockpickSuccess takes the
    entity and seat id as explicit parameters. Caller pre-validates
    both before any side effect, so a corrupted ctx tag can no longer
    produce a "Lock picked!" UI with a used lockpick and nothing
    unlocked.

Package boundaries:

  • client.gltf no longer imports v2.bondage. Render-layer attachment,
    DataDrivenItemReloadListener, and GlbValidationReloadListener all
    live in v2.client.V2ClientSetup.
  • GlbValidationReloadListener moved to v2.bondage.client.diagnostic.
  • Reload-listener ordering is preserved via EventPriority (HIGH for
    the generic GLB cache clear in GltfClientSetup, LOW for bondage
    consumers in V2ClientSetup).
  • Removed the unused validateAgainstDefinition stub on GlbValidator.

Extractions from EntityFurniture:

  • FurnitureSeatSyncCodec (pipe/semicolon serialization for the
    SEAT_ASSIGNMENTS_SYNC entity data field), with 8 unit tests.
  • FurnitureClientAnimator (client-only seat-pose kickoff, moved out
    of the dual-side entity class).
  • EntityFurniture drops ~100 lines with no behavior change.

Interface docs:

  • ISeatProvider Javadoc narrowed to reflect that EntityFurniture is
    the only implementation; callers that need animation state or
    definition reference still downcast.
  • FurnitureAuthPredicate.findOccupant uses the interface only.
  • AnimationIdBuilder flagged as legacy JSON-era utility (NPC
    fallback + MCA mixin).

Artist guide: corrected the "Monster Seat System (Planned)" section
to match the ISeatProvider single-impl reality.

Architectural debt cleanup on top of the earlier V2 hardening pass. Minigame: - LockpickMiniGameState splits the overloaded targetSlot int into a LockpickTargetKind enum + targetData int. Body-vs-furniture dispatch is now a simple enum check; the NBT-tag nonce it previously depended on is gone, along with the AIOOBE risk at BodyRegionV2.values()[targetSlot]. - PacketLockpickAttempt.handleFurnitureLockpickSuccess takes the entity and seat id as explicit parameters. Caller pre-validates both before any side effect, so a corrupted ctx tag can no longer produce a "Lock picked!" UI with a used lockpick and nothing unlocked. Package boundaries: - client.gltf no longer imports v2.bondage. Render-layer attachment, DataDrivenItemReloadListener, and GlbValidationReloadListener all live in v2.client.V2ClientSetup. - GlbValidationReloadListener moved to v2.bondage.client.diagnostic. - Reload-listener ordering is preserved via EventPriority (HIGH for the generic GLB cache clear in GltfClientSetup, LOW for bondage consumers in V2ClientSetup). - Removed the unused validateAgainstDefinition stub on GlbValidator. Extractions from EntityFurniture: - FurnitureSeatSyncCodec (pipe/semicolon serialization for the SEAT_ASSIGNMENTS_SYNC entity data field), with 8 unit tests. - FurnitureClientAnimator (client-only seat-pose kickoff, moved out of the dual-side entity class). - EntityFurniture drops ~100 lines with no behavior change. Interface docs: - ISeatProvider Javadoc narrowed to reflect that EntityFurniture is the only implementation; callers that need animation state or definition reference still downcast. - FurnitureAuthPredicate.findOccupant uses the interface only. - AnimationIdBuilder flagged as legacy JSON-era utility (NPC fallback + MCA mixin). Artist guide: corrected the "Monster Seat System (Planned)" section to match the ISeatProvider single-impl reality.
NotEvil added 1 commit 2026-04-19 00:06:49 +00:00
Architectural debt cleanup on top of the earlier V2 hardening pass.

Minigame:
  - LockpickMiniGameState splits the overloaded targetSlot int into a
    LockpickTargetKind enum + targetData int. Body-vs-furniture
    dispatch is now a simple enum check; the NBT-tag nonce it
    previously depended on is gone, along with the AIOOBE risk at
    BodyRegionV2.values()[targetSlot].
  - PacketLockpickAttempt.handleFurnitureLockpickSuccess takes the
    entity and seat id as explicit parameters. Caller pre-validates
    both before any side effect, so a corrupted ctx tag can no longer
    produce a "Lock picked!" UI with a used lockpick and nothing
    unlocked.

Package boundaries:
  - client.gltf no longer imports v2.bondage. Render-layer attachment,
    DataDrivenItemReloadListener, and GlbValidationReloadListener all
    live in v2.client.V2ClientSetup.
  - GlbValidationReloadListener moved to v2.bondage.client.diagnostic.
  - Reload-listener ordering is preserved via EventPriority (HIGH for
    the generic GLB cache clear in GltfClientSetup, LOW for bondage
    consumers in V2ClientSetup).
  - Removed the unused validateAgainstDefinition stub on GlbValidator.

Extractions from EntityFurniture:
  - FurnitureSeatSyncCodec (pipe/semicolon serialization for the
    SEAT_ASSIGNMENTS_SYNC entity data field), with 8 unit tests.
  - FurnitureClientAnimator (client-only seat-pose kickoff, moved out
    of the dual-side entity class).
  - EntityFurniture drops ~100 lines with no behavior change.

Interface docs:
  - ISeatProvider Javadoc narrowed to reflect that EntityFurniture is
    the only implementation; callers that need animation state or
    definition reference still downcast.
  - FurnitureAuthPredicate.findOccupant uses the interface only.
  - AnimationIdBuilder flagged as legacy JSON-era utility (NPC
    fallback + MCA mixin).

Artist guide: corrected the "Monster Seat System (Planned)" section
to match the ISeatProvider single-impl reality.
NotEvil merged commit 5d0c7c6c69 into develop 2026-04-19 00:06:55 +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-#22