Class FabricDataGenerator.Pack
java.lang.Object
net.minecraft.data.DataGenerator.Pack
net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator.Pack
- Enclosing class:
FabricDataGenerator
Represents a pack of generated data (i.e. data pack or resource pack). Providers are added to a pack.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A factory of a data provider.static interface
A factory of a data provider. -
Method Summary
Modifier and TypeMethodDescription<T extends DataProvider>
TaddProvider
(FabricDataGenerator.Pack.Factory<T> factory) Registers a constructor ofDataProvider
which takes aFabricDataOutput
.<T extends DataProvider>
TRegisters a constructor ofDataProvider
which takes aFabricDataOutput
and the registries.Methods inherited from class net.minecraft.data.DataGenerator.Pack
addProvider
-
Method Details
-
addProvider
Registers a constructor ofDataProvider
which takes aFabricDataOutput
.- Returns:
- the
DataProvider
-
addProvider
public <T extends DataProvider> T addProvider(FabricDataGenerator.Pack.RegistryDependentFactory<T> factory) Registers a constructor ofDataProvider
which takes aFabricDataOutput
and the registries. This is used, for example, withFabricTagProvider
.- Returns:
- the
DataProvider
-