Skip to content

Fix Canvas player NPC region registration during spawn - #3329

Open
RLFrieren wants to merge 1 commit into
CitizensDev:masterfrom
RLFrieren:codex/canvas-region-player-spawn
Open

Fix Canvas player NPC region registration during spawn#3329
RLFrieren wants to merge 1 commit into
CitizensDev:masterfrom
RLFrieren:codex/canvas-region-player-spawn

Conversation

@RLFrieren

Copy link
Copy Markdown
Contributor

Canvas performs a region ownership check during ServerLevel#addFreshEntity. A Citizens player NPC reaches that call before its fake network connection is associated with the active RegionizedWorldData, so Canvas rejects the spawn as an async entity insertion.

The player is now positioned before insertion. On Canvas 26.1, the fake connection is attached to the active region only for the insertion operation, then removed in a finally block. The temporary view-distance change is restored there as well.

Validation:

  • Canvas 26.1.2 build 876: repeated player NPC spawn, removal, death, and respawn cycles
  • Folia 26.1.2 build 8: spawn and respawn smoke test
  • mvn -DskipTests -pl v1_21_R7,v26_1_R1,v26_2_R1 -am compile

@CLAassistant

CLAassistant commented Jul 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@RLFrieren
RLFrieren force-pushed the codex/canvas-region-player-spawn branch from a918879 to eecf17b Compare July 27, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants