Class DataMapProvider
java.lang.Object
net.neoforged.neoforge.common.data.DataMapProvider
- All Implemented Interfaces:
DataProvider
- Direct Known Subclasses:
NeoForgeDataMapsProvider
A provider for
data map
generation.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
DataMapProvider.AdvancedBuilder<T,
R, VR extends DataMapValueRemover<R, T>> static class
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map
<DataMapType<?, ?>, DataMapProvider.Builder<?, ?>> protected final CompletableFuture
<HolderLookup.Provider> protected final PackOutput.PathProvider
Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, KEY_COMPARATOR, LOGGER
-
Constructor Summary
ModifierConstructorDescriptionprotected
DataMapProvider
(PackOutput packOutput, CompletableFuture<HolderLookup.Provider> lookupProvider) Create a new provider. -
Method Summary
Modifier and TypeMethodDescription<T,
R, VR extends DataMapValueRemover<R, T>>
DataMapProvider.AdvancedBuilder<T, R, VR> builder
(AdvancedDataMapType<R, T, VR> type) <T,
R> DataMapProvider.Builder <T, R> builder
(DataMapType<R, T> type) protected abstract void
gather()
Generate data map entries.private <T,
R> CompletableFuture <?> generate
(Path out, CachedOutput cache, DataMapProvider.Builder<T, R> builder, com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> ops) getName()
run
(CachedOutput cache)
-
Field Details
-
lookupProvider
-
pathProvider
-
builders
-
-
Constructor Details
-
DataMapProvider
protected DataMapProvider(PackOutput packOutput, CompletableFuture<HolderLookup.Provider> lookupProvider) Create a new provider.- Parameters:
packOutput
- the output locationlookupProvider
- a CompletableFuture supplying the registries
-
-
Method Details
-
run
- Specified by:
run
in interfaceDataProvider
-
generate
private <T,R> CompletableFuture<?> generate(Path out, CachedOutput cache, DataMapProvider.Builder<T, R> builder, com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> ops) -
gather
protected abstract void gather()Generate data map entries. -
builder
-
builder
public <T,R, DataMapProvider.AdvancedBuilder<T,VR extends DataMapValueRemover<R, T>> R, builderVR> (AdvancedDataMapType<R, T, VR> type) -
getName
- Specified by:
getName
in interfaceDataProvider
-