Skip to content

JourneyMap Not Working on Velocity Setup #241

@ChiboYen

Description

@ChiboYen

When switching between backend servers through a Velocity proxy, MapModCompanion sends the world ID packet before the client has fully loaded into the new world. This causes mods that act on the packet immediately (such as JourneyMap) to crash with a NullPointerException because mc.level is still null at the time the packet is received.

To Reproduce

  1. Set up two Minecraft backend servers behind a Velocity proxy, both with MapModCompanion installed
  2. Connect to the first server
  3. Use Velocity to switch to the second server
  4. Observe the receiving mod crash/error on the render thread

Expected behavior
The world ID packet should be sent only after the player is fully loaded into the world on the new backend server, so that mc.level is guaranteed to be non-null on the client when the packet arrives.

Evidence
JourneyMap logs show the packet arriving at 21:23:38 during the transfer window, at which point mc.level is null:

[21:23:38] [Render thread/ERROR] [MappingMonitorTask] NullPointerException: Cannot invoke "net.minecraft.client.multiplayer.ClientLevel.dimension()" because "mc.level" is null

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