Interface DataGeneratorEntrypoint
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An entry point for data generation.
In fabric.mod.json
, the entrypoint is defined with fabric-datagen
key.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable String
Returns the mod ID of the mod the data is being generated for.void
onInitializeDataGenerator
(FabricDataGenerator fabricDataGenerator) RegisterDataProvider
with theFabricDataGenerator
during this entrypoint.
-
Method Details
-
onInitializeDataGenerator
RegisterDataProvider
with theFabricDataGenerator
during this entrypoint.- Parameters:
fabricDataGenerator
- TheFabricDataGenerator
instance
-
getEffectiveModId
Returns the mod ID of the mod the data is being generated for. Anull
return will run the data generator using the mod ID that registered the current entrypoint.- Returns:
- a
String
ornull
- Throws:
RuntimeException
- If the mod ID does not exist.
-