Package net.minecraftforge.registries
Class DataPackRegistriesHooks
java.lang.Object
net.minecraftforge.registries.DataPackRegistriesHooks
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Map
<ResourceKey<? extends Registry<?>>, RegistryDataLoader.RegistryData<?>> private static final Set
<ResourceKey<? extends Registry<?>>> private static final Set
<ResourceKey<? extends Registry<?>>> private static final List
<RegistryDataLoader.RegistryData<?>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static <T> void
static List
<RegistryDataLoader.RegistryData<?>> Deprecated.static Stream
<RegistryDataLoader.RegistryData<?>> Deprecated.static Set
<ResourceKey<? extends Registry<?>>> Returns An unmodifiable view of the set of synced non-vanilla datapack registry IDs.static Map
<ResourceKey<? extends Registry<?>>, RegistryDataLoader.RegistryData<?>> grabNetworkableRegistries
(com.google.common.collect.ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistryDataLoader.RegistryData<?>> builder) static List
<RegistryDataLoader.RegistryData<?>> grabWorldgenRegistries
(RegistryDataLoader.RegistryData<?>... vanilla) Captures a mutable view ofRegistryDataLoader.WORLDGEN_REGISTRIES
so that we can register modded entries during the registry event.
-
Field Details
-
NETWORKABLE_REGISTRIES
private static final Map<ResourceKey<? extends Registry<?>>,RegistryDataLoader.RegistryData<?>> NETWORKABLE_REGISTRIES -
WORLDGEN_REGISTRIES
-
SYNCED_CUSTOM_REGISTRIES
-
SYNCED_CUSTOM_REGISTRIES_VIEW
-
-
Constructor Details
-
DataPackRegistriesHooks
private DataPackRegistriesHooks()
-
-
Method Details
-
grabNetworkableRegistries
public static Map<ResourceKey<? extends Registry<?>>,RegistryDataLoader.RegistryData<?>> grabNetworkableRegistries(com.google.common.collect.ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistryDataLoader.RegistryData<?>> builder) -
addRegistryCodec
-
getDataPackRegistries
Deprecated.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
@Deprecated public static Stream<RegistryDataLoader.RegistryData<?>> getDataPackRegistriesWithDimensions()Deprecated. -
grabWorldgenRegistries
public static List<RegistryDataLoader.RegistryData<?>> grabWorldgenRegistries(RegistryDataLoader.RegistryData<?>... vanilla) Captures a mutable view ofRegistryDataLoader.WORLDGEN_REGISTRIES
so that we can register modded entries during the registry event. All uses should use that field instead of this class.- Parameters:
vanilla
- The vanilla worldgen registries- Returns:
- An unmodifiable list of worldgen registries
-
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
-