Skip to content

Fix entities not spawning in structures on Forge - #4307

Merged
Yeregorix merged 1 commit into
SpongePowered:api-8from
XMxmx111:api-8
Sep 1, 2026
Merged

Fix entities not spawning in structures on Forge#4307
Yeregorix merged 1 commit into
SpongePowered:api-8from
XMxmx111:api-8

Conversation

@XMxmx111

@XMxmx111 XMxmx111 commented Sep 1, 2026

Copy link
Copy Markdown

Sponge replaces MinecraftServer#loadLevel with this world loading path, which never reaches MinecraftServer#prepareLevels.
Forge injects StructureSpawnManager.gatherEntitySpawns() at the very start of prepareLevels to populate its structure spawn registry (structuresWithSpawns, including the vanilla defaults pre-filled by the gather event).

@Yeregorix

Copy link
Copy Markdown
Member

Ah I didn't notice that this was about API 8 when I suggested to open a PR. We usually no longer work with this outdated version but I guess I will make an exception this time because the changes are quite small. However we no longer merge API 8 changes upward, but this shouldn't be a problem in this case because the loadLevel override is gone in API 12.

@Yeregorix Yeregorix changed the title fix restore Forge structure spawns (API 8) Fix entities not spawning in structures on Forge Sep 1, 2026
@Yeregorix
Yeregorix merged commit 81878a5 into SpongePowered:api-8 Sep 1, 2026
9 checks passed
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