Skip to content

Fix orphaned intrusive holders when a RegistryCondition skips an entry#98

Merged
MelanX merged 1 commit into
1.21from
fix/registration_conditions
Apr 12, 2026
Merged

Fix orphaned intrusive holders when a RegistryCondition skips an entry#98
MelanX merged 1 commit into
1.21from
fix/registration_conditions

Conversation

@MelanX
Copy link
Copy Markdown
Member

@MelanX MelanX commented Apr 12, 2026

When RegistrationDispatcher.register() returned early because a RegistryCondition evaluated to false, the early return skipped the registerAdditional() call but did not clean up any intrusive holder that the entry's constructor may have already allocated via MappedRegistry.createIntrusiveHolder(). The holder was left in MappedRegistry.unregisteredIntrusiveHolders but never bound, so when the registry froze at world load, Minecraft threw "Some intrusive holders were not registered".

When RegistrationDispatcher.register() returned early because a RegistryCondition evaluated to false, the early return skipped the registerAdditional() call but did not clean up any intrusive holder that the entry's constructor may have already allocated via MappedRegistry.createIntrusiveHolder(). The holder was left in MappedRegistry.unregisteredIntrusiveHolders but never bound, so when the registry froze at world load, Minecraft threw "Some intrusive holders were not registered".
@MelanX MelanX merged commit 69f1cad into 1.21 Apr 12, 2026
1 check passed
@MelanX MelanX deleted the fix/registration_conditions branch April 12, 2026 08:41
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.

1 participant