Package net.minecraft.data.registries
Class RegistriesDatapackGenerator
java.lang.Object
net.minecraft.data.registries.RegistriesDatapackGenerator
- All Implemented Interfaces:
DataProvider
- Direct Known Subclasses:
DatapackBuiltinEntriesProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PackOutput
private final CompletableFuture
<HolderLookup.Provider> Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, KEY_COMPARATOR, LOGGER
-
Constructor Summary
ConstructorDescriptionRegistriesDatapackGenerator
(PackOutput p_256643_, CompletableFuture<HolderLookup.Provider> p_255780_) RegistriesDatapackGenerator
(PackOutput p_256643_, CompletableFuture<HolderLookup.Provider> p_255780_, Set<String> modIds) -
Method Summary
Modifier and TypeMethodDescriptionprivate <T> Optional
<CompletableFuture<?>> dumpRegistryCap
(CachedOutput p_256502_, HolderLookup.Provider p_256492_, com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> p_256000_, RegistryDataLoader.RegistryData<T> p_256449_) private static <E> CompletableFuture
<?> dumpValue
(Path p_255678_, CachedOutput p_256438_, com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> p_256127_, com.mojang.serialization.Encoder<E> p_255938_, E p_256590_) getName()
Forge: Call this to get the registry holder lookup provider that includes elements added viaDatapackBuiltinEntriesProvider
run
(CachedOutput p_255785_)
-
Field Details
-
output
-
registries
-
namespacePredicate
-
-
Constructor Details
-
RegistriesDatapackGenerator
public RegistriesDatapackGenerator(PackOutput p_256643_, CompletableFuture<HolderLookup.Provider> p_255780_) -
RegistriesDatapackGenerator
public RegistriesDatapackGenerator(PackOutput p_256643_, CompletableFuture<HolderLookup.Provider> p_255780_, @Nullable Set<String> modIds)
-
-
Method Details
-
getRegistryProvider
Forge: Call this to get the registry holder lookup provider that includes elements added viaDatapackBuiltinEntriesProvider
-
run
- Specified by:
run
in interfaceDataProvider
-
dumpRegistryCap
private <T> Optional<CompletableFuture<?>> dumpRegistryCap(CachedOutput p_256502_, HolderLookup.Provider p_256492_, com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> p_256000_, RegistryDataLoader.RegistryData<T> p_256449_) -
dumpValue
private static <E> CompletableFuture<?> dumpValue(Path p_255678_, CachedOutput p_256438_, com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> p_256127_, com.mojang.serialization.Encoder<E> p_255938_, E p_256590_) -
getName
- Specified by:
getName
in interfaceDataProvider
-