Skip to content

Conversation

@Faithcaio
Copy link
Contributor

@Faithcaio Faithcaio commented Mar 26, 2025

SpongeAPI | Sponge

Adds RegistryKey#asScopedReference
and RegistryType#asScopedType
which uses the current Cause to determine an appropiate RegistryHolder
if none is found it falls back to Server if available else to Game

This allows early access to registries available after Game but before Server.
E.g. EnchantmentTypes during registration for recipes.

@MrHell228
Copy link
Contributor

Server DefaultedRegistryTypes should probably use scoped registry holder as well

@Faithcaio Faithcaio force-pushed the feature/scopedregistryholder branch from 4bd89eb to 53b9cfe Compare March 27, 2025 17:07
@Faithcaio Faithcaio merged commit 69b4c97 into api-14 Mar 29, 2025
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.

3 participants