Interface BibliocraftDatagenHelper


public interface BibliocraftDatagenHelper
This class provides helper methods to generate datagen entries for Bibliocraft blocks with your mod's wood type(s). Get via BibliocraftApi.getDatagenHelper(). To use this class, during GatherDataEvent, create a new instance of this class with your mod id. Then, call whatever methods you need from the respective providers. Always pass in your mod's corresponding data provider.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Marks all BibliocraftWoodTypes from the given mod as to-be-datagenned.
    void
    Marks a BibliocraftWoodType as to-be-datagenned.
    void
    generateAll(String modId, CompletableFuture<net.minecraft.core.HolderLookup.Provider> lookupProvider, net.minecraft.data.DataGenerator.PackGenerator clientPack, net.minecraft.data.DataGenerator.PackGenerator serverPack, net.neoforged.neoforge.common.data.LanguageProvider languageProvider, Function<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>, net.minecraft.data.tags.TagAppender<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.Block>> blockTagAppenderFactory, Function<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>, net.minecraft.data.tags.TagAppender<net.minecraft.world.item.Item, net.minecraft.world.item.Item>> itemTagAppenderFactory)
    Generates language files, block and item models, block and item tags, loot tables, and recipes for Bibliocraft blocks with your mod's wood type(s).
     
  • Method Details

    • addWoodTypeToGenerate

      void addWoodTypeToGenerate(BibliocraftWoodType woodType)
      Marks a BibliocraftWoodType as to-be-datagenned. This method is thread-safe.
      Parameters:
      woodType - The BibliocraftWoodType to mark.
    • getWoodTypesToGenerate

      List<BibliocraftWoodType> getWoodTypesToGenerate()
      Returns:
      An unmodifiable list of all BibliocraftWoodTypes to datagen.
    • addWoodTypesToGenerateByModid

      default void addWoodTypesToGenerateByModid(String modid)
      Marks all BibliocraftWoodTypes from the given mod as to-be-datagenned. This method is thread-safe.
      Parameters:
      modid - The id of the mod to mark the BibliocraftWoodTypes of.
    • generateAll

      void generateAll(String modId, CompletableFuture<net.minecraft.core.HolderLookup.Provider> lookupProvider, net.minecraft.data.DataGenerator.PackGenerator clientPack, net.minecraft.data.DataGenerator.PackGenerator serverPack, net.neoforged.neoforge.common.data.LanguageProvider languageProvider, Function<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>, net.minecraft.data.tags.TagAppender<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.Block>> blockTagAppenderFactory, Function<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>, net.minecraft.data.tags.TagAppender<net.minecraft.world.item.Item, net.minecraft.world.item.Item>> itemTagAppenderFactory)
      Generates language files, block and item models, block and item tags, loot tables, and recipes for Bibliocraft blocks with your mod's wood type(s). Call this directly from a GatherDataEvent handler!
      Parameters:
      modId - The namespace to store the files under, where applicable.
      lookupProvider - The lookup provider to use for the datagen.
      clientPack - The client datagen pack to use.
      serverPack - The server datagen pack to use.
      languageProvider - Your mod's LanguageProvider.