Skip to content

The map cannot be dragged or zoomed on the web, vanishes when zoomed out, and has never rendered the nether or the end #135

Description

@CaYatur

Six defects, each confirmed in the source or against a real world.

1. No drag or zoom on either web map, and the wheel scrolls the page

.mp-empty is position:absolute; inset:0 — it covers the whole canvas — and
in #103 I removed its pointer-events:none so the bridge install button inside
it could be clicked. That handed every mouse event on the map to an invisible
overlay: mousedown, mousemove and the wheel listener that calls
preventDefault all stop at it. Hence no panning, no zooming, and a wheel that
falls through to the page.

The desktop is unaffected only because its markup is different — which is also
why the desktop's wheel scrolls the page: React's onWheel is passive, so its
preventDefault does nothing.

2. The terrain vanishes when zoomed out

mapVisibleChunks() returns [] above 4096 chunks in view, and it is used for
both what to request and what to draw. Zoomed out, the request cap correctly
refuses to ask for a million chunks — and takes the drawing with it, so the map
blanks. Those are two different questions.

3. The parse budget throttles cache hits

drain() waits for parseBudgetReady() before every job. The budget exists to
stop back-to-back region PARSES holding the main thread; a cache hit costs about
a millisecond and is made to wait 250 ms anyway. After #134 most reads are cache
hits, so the brake now applies almost exclusively to the fast path.

4. Chunks that are genuinely empty are requested forever

The client marks a chunk as "known empty" only when the whole response reports
pending === 0. On a busy viewport something is always pending, so a chunk the
server has parsed and found empty is never marked, and the client asks for it
again on every draw. This is "sometimes it never loads".

5. The nether and the end have never worked

Paper splits dimensions into separate world folders. On the real server:

world/            world_nether/DIM-1/     world_the_end/DIM1/

dimensionFolder builds world/DIM-1/region, which does not exist, so every
tile lookup misses. Vanilla does use world/DIM-1, so both layouts have to be
tried. Custom worlds (Multiverse and friends) are their own folder again.

6. The nether needs a different technique

A top-down scan finds the bedrock ceiling and renders the entire nether as one
flat grey slab. A nether map has to start below the roof: walk down from the
ceiling to the first air, then on to the first solid — the floor a player
actually stands on.

Also

  • The terrain toggle should default on for the public site.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions