Class DataPackRegistriesHooks
java.lang.Object
net.neoforged.neoforge.registries.DataPackRegistriesHooks
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DataPackRegistriesHooks.DatapackRegistryGroupprivate static final DataPackRegistriesHooks.DatapackRegistryGroupprivate static final DataPackRegistriesHooks.DatapackRegistryGroup -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T> void(package private) static <T> voidstatic List<RegistryDataLoader.RegistryData<?>> Internal hook for retaining mutable access toRegistryDataLoader's reloadable registry list when it bootstraps.static List<RegistryDataLoader.RegistryData<?>> Internal hook for retaining mutable access toRegistryDataLoader's synced registry list when it bootstraps.static List<RegistryDataLoader.RegistryData<?>> Internal hook for retaining mutable access toRegistryDataLoader's world registry list when it bootstraps.static Stream<RegistryDataLoader.RegistryData<?>> Returns a stream of the "world" and dimension datapack registries.static booleanisReloadableRegistry(ResourceKey<? extends Registry<?>> registry) static booleanisSyncedRegistry(ResourceKey<? extends Registry<?>> registry) static booleanisWorldRegistry(ResourceKey<? extends Registry<?>> registry)
-
Field Details
-
WORLD_REGISTRIES
-
RELOADABLE_REGISTRIES
-
SYNCED_REGISTRIES
-
-
Constructor Details
-
DataPackRegistriesHooks
private DataPackRegistriesHooks()
-
-
Method Details
-
captureWorldRegistries
public static List<RegistryDataLoader.RegistryData<?>> captureWorldRegistries(List<RegistryDataLoader.RegistryData<?>> list) Internal hook for retaining mutable access toRegistryDataLoader's world registry list when it bootstraps. -
captureReloadableRegistries
public static List<RegistryDataLoader.RegistryData<?>> captureReloadableRegistries(List<RegistryDataLoader.RegistryData<?>> list) Internal hook for retaining mutable access toRegistryDataLoader's reloadable registry list when it bootstraps. -
captureSyncedRegistries
public static List<RegistryDataLoader.RegistryData<?>> captureSyncedRegistries(List<RegistryDataLoader.RegistryData<?>> list) Internal hook for retaining mutable access toRegistryDataLoader's synced registry list when it bootstraps. -
addWorldRegistry
-
addReloadableRegistry
-
getWorldRegistriesWithDimensions
Returns a stream of the "world" and dimension datapack registries.
These registries are loaded from per-world datapacks on server startup.
This method is used in datagen (
RegistryPatchGenerator,RegistriesDatapackGenerator,DatapackBuiltinEntriesProvider) in place ofRegistryDataLoader.WORLD_REGISTRIESto ensure mods can datagen dimensions.- Returns:
- a stream of the "world" and dimension datapack registries
-
isWorldRegistry
-
isReloadableRegistry
-
isSyncedRegistry
-