Class FabricDataOutput

java.lang.Object
net.minecraft.data.DataOutput
net.fabricmc.fabric.api.datagen.v1.FabricDataOutput

public final class FabricDataOutput extends DataOutput
Extends DataOutput to keep track of the ModContainer that it originated from.
  • Constructor Details

    • FabricDataOutput

      @Internal public FabricDataOutput(net.fabricmc.loader.api.ModContainer modContainer, Path path, boolean strictValidation)
  • Method Details

    • getModContainer

      public net.fabricmc.loader.api.ModContainer getModContainer()
      Returns the ModContainer for the mod that this data generator has been created for.
      Returns:
      a ModContainer instance
    • getModId

      public String getModId()
      Returns the mod ID for the mod that this data generator has been created for.
      Returns:
      a mod ID
    • isStrictValidationEnabled

      public boolean isStrictValidationEnabled()
      When enabled data providers can do strict validation to ensure that all entries have data generated for them.
      Returns:
      if strict validation should be enabled