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.

@FunctionalInterface public interface DataGeneratorEntrypoint
An entry point for data generation.

In fabric.mod.json, the entrypoint is defined with fabric-datagen key.

See Also:
  • Method Details

    • onInitializeDataGenerator

      void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator)
      Register DataProvider with the FabricDataGenerator during this entrypoint.
      Parameters:
      fabricDataGenerator - The FabricDataGenerator instance
    • getEffectiveModId

      @Nullable default @Nullable String getEffectiveModId()
      Returns the mod ID of the mod the data is being generated for. A null return will run the data generator using the mod ID that registered the current entrypoint.
      Returns:
      a String or null
      Throws:
      RuntimeException - If the mod ID does not exist.