Class DataPackRegistriesHooks
java.lang.Object
net.neoforged.neoforge.registries.DataPackRegistriesHooks
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final List<RegistryDataLoader.RegistryData<?>>
private static final List<RegistryDataLoader.RegistryData<?>>
private static final Map<ResourceKey<? extends Registry<?>>,
RegistrySynchronization.NetworkedRegistryData<?>> private static final Set<ResourceKey<? extends Registry<?>>>
private static final Set<ResourceKey<? extends Registry<?>>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static <T> void
static List<RegistryDataLoader.RegistryData<?>>
Returns An unmodifiable view of the list of datapack registries.static Stream<RegistryDataLoader.RegistryData<?>>
static Set<ResourceKey<? extends Registry<?>>>
Returns An unmodifiable view of the set of synced non-vanilla datapack registry IDs.static Map<ResourceKey<? extends Registry<?>>,
RegistrySynchronization.NetworkedRegistryData<?>> grabNetworkableRegistries
(com.google.common.collect.ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistrySynchronization.NetworkedRegistryData<?>> builder)
-
Field Details
-
NETWORKABLE_REGISTRIES
private static final Map<ResourceKey<? extends Registry<?>>,RegistrySynchronization.NetworkedRegistryData<?>> NETWORKABLE_REGISTRIES -
DATA_PACK_REGISTRIES
-
DATA_PACK_REGISTRIES_VIEW
-
SYNCED_CUSTOM_REGISTRIES
-
SYNCED_CUSTOM_REGISTRIES_VIEW
-
-
Constructor Details
-
DataPackRegistriesHooks
private DataPackRegistriesHooks()
-
-
Method Details
-
grabNetworkableRegistries
public static Map<ResourceKey<? extends Registry<?>>,RegistrySynchronization.NetworkedRegistryData<?>> grabNetworkableRegistries(com.google.common.collect.ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistrySynchronization.NetworkedRegistryData<?>> builder) -
addRegistryCodec
-
getDataPackRegistries
Returns An unmodifiable view of the list of datapack registries.. These registries are loaded from per-world datapacks on server startup.- Returns:
- An unmodifiable view of the list of datapack registries
-
getDataPackRegistriesWithDimensions
-
getSyncedCustomRegistries
Returns An unmodifiable view of the set of synced non-vanilla datapack registry IDs. Clients must have each of a server's synced datapack registries to be able to connect to that server; vanilla clients therefore cannot connect if this list is non-empty on the server.- Returns:
- An unmodifiable view of the set of synced non-vanilla datapack registry IDs
-