wrap-controller-fixes-and-gametests into main #1

Merged
Flexhd merged 2 commits from wrap-controller-fixes-and-gametests into main 2026-08-05 17:22:20 +00:00
Owner
No description provided.
Enable WorldWrapController and delete PlayerEntityMixin. The mixin compared
X against getBoundNorth/getBoundSouth (Z bounds) and wrapped via x * -1, so
it only worked on a border centred on the origin; it treated fluid as a safe
landing, checked a single block for a two-block-tall player, never fired for
riding players because travel() is not called while mounted, and did no chunk
preloading.

Fix the controller's own bugs along the way:

- An axis with no crossing was snapped to the low wall instead of being
  carried through, so walking north over the border also yanked the player
  to the west wall and preloaded the wrong chunk.
- Use RegistryKey instead of System.identityHashCode for world identity.
- Release preload state on disconnect, on server stop, and on leaving the
  band; it previously leaked an entry per player.
- Refresh the approach ticket at half its lifetime; the refresh interval
  equalled the ticket lifetime, leaving a window where the destination
  could unload.
- The "synchronous fallback" chunk lookup discarded its result and forced
  nothing, and the final getTopY fallback could read an unloaded heightmap.
- Make the dry-landing ring scan linear in the radius rather than cubic.

Defer instead of blocking when the destination is not resident. wrap() now
checks readiness without forcing, raises a ticket, and postpones; the player
keeps moving into the opaque fog and the wall opens once generation catches
up. The wait is bounded so a destination that never loads cannot pin anyone
against the border. Blocking is now only reachable after three seconds.

Extract WrapBounds so the wrap can be driven over an explicit box, since the
world border is global state a test cannot safely reshape.

Add 44 gametests: wall and corner geometry, off-centre borders, inset
ordering across sizes, arrival never re-entering a trigger band, lava, water,
low ceilings, pillars, flight and spectator altitude, velocity, yaw/pitch,
fall distance, boats with riders, preloading, and deferral.

Not covered: client-side smoothness of the velocity-carrying teleport packet,
elytra gliding, the END_WORLD_TICK wiring against a real border, and the
bounded-wait failsafe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Flexhd merged commit 2eb7fc1418 into main 2026-08-05 17:22:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Nexusrealms/thefogiscomming!1
No description provided.