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.
    default void
    generateAll(String modId, net.neoforged.neoforge.data.event.GatherDataEvent event, net.neoforged.neoforge.common.data.LanguageProvider englishLanguageProvider, net.neoforged.neoforge.common.data.BlockTagsProvider blockTagsProvider, net.minecraft.data.tags.ItemTagsProvider itemTagsProvider)
    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).
    void
    generateAllFor(BibliocraftWoodType woodType, String modId, net.neoforged.neoforge.data.event.GatherDataEvent event, net.neoforged.neoforge.common.data.LanguageProvider englishLanguageProvider, net.neoforged.neoforge.common.data.BlockTagsProvider blockTagsProvider, net.minecraft.data.tags.ItemTagsProvider itemTagsProvider)
    Generates language files, block and item models, block and item tags, loot tables, and recipes for Bibliocraft blocks with a BibliocraftWoodType.
    default void
    generateBlockStates(net.neoforged.neoforge.client.model.generators.BlockStateProvider provider)
    Generates the blockstates and block model files for Bibliocraft blocks with your mod's wood type(s).
    void
    generateBlockStatesFor(net.neoforged.neoforge.client.model.generators.BlockStateProvider provider, BibliocraftWoodType woodType)
    Generates the blockstates and block model files for Bibliocraft blocks with a BibliocraftWoodType.
    default void
    generateBlockTags(Function<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>,net.minecraft.data.tags.IntrinsicHolderTagsProvider.IntrinsicTagAppender<net.minecraft.world.level.block.Block>> tagAccessor)
    Generates the block tag files for Bibliocraft blocks with your mod's wood type(s).
    void
    generateBlockTagsFor(Function<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>,net.minecraft.data.tags.IntrinsicHolderTagsProvider.IntrinsicTagAppender<net.minecraft.world.level.block.Block>> tagAccessor, BibliocraftWoodType woodType)
    Generates the block tag files for Bibliocraft blocks with a BibliocraftWoodType.
    default void
    generateEnglishTranslations(net.neoforged.neoforge.common.data.LanguageProvider provider)
    Generates the English (en_us) translation files for Bibliocraft blocks with your mod's wood type(s).
    void
    generateEnglishTranslationsFor(net.neoforged.neoforge.common.data.LanguageProvider provider, BibliocraftWoodType woodType)
    Generates the English (en_us) translation files for Bibliocraft blocks with a BibliocraftWoodType.
    default void
    generateItemModels(net.neoforged.neoforge.client.model.generators.ItemModelProvider provider)
    Generates the item model files for Bibliocraft items with your mod's wood type(s).
    void
    generateItemModelsFor(net.neoforged.neoforge.client.model.generators.ItemModelProvider provider, BibliocraftWoodType woodType)
    Generates the item model files for Bibliocraft blocks with a BibliocraftWoodType.
    default void
    generateItemTags(Function<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>,net.minecraft.data.tags.IntrinsicHolderTagsProvider.IntrinsicTagAppender<net.minecraft.world.item.Item>> tagAccessor)
    Generates the item tag files for Bibliocraft blocks with your mod's wood type(s).
    void
    generateItemTagsFor(Function<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>,net.minecraft.data.tags.IntrinsicHolderTagsProvider.IntrinsicTagAppender<net.minecraft.world.item.Item>> tagAccessor, BibliocraftWoodType woodType)
    Generates the item tag files for Bibliocraft blocks with a BibliocraftWoodType.
    default void
    Generates the loot table files for Bibliocraft blocks with your mod's wood type(s).
    void
    Generates the loot table files for Bibliocraft blocks with a BibliocraftWoodType.
    default void
    generateRecipes(net.minecraft.data.recipes.RecipeOutput output, String modId)
    Generates the recipe files for Bibliocraft blocks with your mod's wood type(s).
    void
    generateRecipesFor(net.minecraft.data.recipes.RecipeOutput output, BibliocraftWoodType woodType, String modId)
    Generates the recipe files for Bibliocraft blocks with a BibliocraftWoodType.
     
  • 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.
    • generateEnglishTranslationsFor

      void generateEnglishTranslationsFor(net.neoforged.neoforge.common.data.LanguageProvider provider, BibliocraftWoodType woodType)
      Generates the English (en_us) translation files for Bibliocraft blocks with a BibliocraftWoodType.
      Parameters:
      provider - The LanguageProvider to use.
      woodType - The BibliocraftWoodType to generate the translations for.
    • generateBlockStatesFor

      void generateBlockStatesFor(net.neoforged.neoforge.client.model.generators.BlockStateProvider provider, BibliocraftWoodType woodType)
      Generates the blockstates and block model files for Bibliocraft blocks with a BibliocraftWoodType.
      Parameters:
      provider - The BlockStateProvider to use. Note: The provider's mod id must be the same as BibliocraftApi.MOD_ID!
      woodType - The BibliocraftWoodType to generate the blockstates and block models for.
    • generateItemModelsFor

      void generateItemModelsFor(net.neoforged.neoforge.client.model.generators.ItemModelProvider provider, BibliocraftWoodType woodType)
      Generates the item model files for Bibliocraft blocks with a BibliocraftWoodType.
      Parameters:
      provider - The ItemModelProvider to use. Note: The provider's mod id must be the same as BibliocraftApi.MOD_ID!
      woodType - The BibliocraftWoodType to generate the item models for.
    • generateBlockTagsFor

      void generateBlockTagsFor(Function<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>,net.minecraft.data.tags.IntrinsicHolderTagsProvider.IntrinsicTagAppender<net.minecraft.world.level.block.Block>> tagAccessor, BibliocraftWoodType woodType)
      Generates the block tag files for Bibliocraft blocks with a BibliocraftWoodType.
      Parameters:
      tagAccessor - A reference to your mod's IntrinsicHolderTagsProvider.tag(TagKey) method, as it is protected for some reason.
      woodType - The BibliocraftWoodType to generate the block tags for.
    • generateItemTagsFor

      void generateItemTagsFor(Function<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>,net.minecraft.data.tags.IntrinsicHolderTagsProvider.IntrinsicTagAppender<net.minecraft.world.item.Item>> tagAccessor, BibliocraftWoodType woodType)
      Generates the item tag files for Bibliocraft blocks with a BibliocraftWoodType.
      Parameters:
      tagAccessor - A reference to your mod's IntrinsicHolderTagsProvider.tag(TagKey) method, as it is protected for some reason.
      woodType - The BibliocraftWoodType to generate the item tags for.
    • generateLootTablesFor

      void generateLootTablesFor(BlockLootTableProvider provider, BibliocraftWoodType woodType)
      Generates the loot table files for Bibliocraft blocks with a BibliocraftWoodType.
      Parameters:
      provider - The BlockLootTableProvider to use.
      woodType - The BibliocraftWoodType to generate the loot tables for.
    • generateRecipesFor

      void generateRecipesFor(net.minecraft.data.recipes.RecipeOutput output, BibliocraftWoodType woodType, String modId)
      Generates the recipe files for Bibliocraft blocks with a BibliocraftWoodType.
      Parameters:
      output - The RecipeOutput to use.
      woodType - The BibliocraftWoodType to generate the recipes for.
      modId - The namespace to store the recipes under.
    • generateAllFor

      void generateAllFor(BibliocraftWoodType woodType, String modId, net.neoforged.neoforge.data.event.GatherDataEvent event, net.neoforged.neoforge.common.data.LanguageProvider englishLanguageProvider, net.neoforged.neoforge.common.data.BlockTagsProvider blockTagsProvider, net.minecraft.data.tags.ItemTagsProvider itemTagsProvider)
      Generates language files, block and item models, block and item tags, loot tables, and recipes for Bibliocraft blocks with a BibliocraftWoodType. Call this directly from a GatherDataEvent handler!
      Parameters:
      woodType - The BibliocraftWoodType to generate the files for.
      modId - The namespace to store the files under, where applicable.
      event - The GatherDataEvent whose handler this is called from.
      englishLanguageProvider - The LanguageProvider to use for generating english translations.
      blockTagsProvider - The BlockTagsProvider to use for generating block tags. It is strongly suggested this be a NonClearingBlockTagsProvider.
      itemTagsProvider - The ItemTagsProvider to use for generating item tags. It is strongly suggested this be a NonClearingItemTagsProvider.
    • 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.
    • generateEnglishTranslations

      default void generateEnglishTranslations(net.neoforged.neoforge.common.data.LanguageProvider provider)
      Generates the English (en_us) translation files for Bibliocraft blocks with your mod's wood type(s).
      Parameters:
      provider - Your mod's LanguageProvider.
    • generateBlockStates

      default void generateBlockStates(net.neoforged.neoforge.client.model.generators.BlockStateProvider provider)
      Generates the blockstates and block model files for Bibliocraft blocks with your mod's wood type(s).
      Parameters:
      provider - Your mod's BlockStateProvider.
    • generateItemModels

      default void generateItemModels(net.neoforged.neoforge.client.model.generators.ItemModelProvider provider)
      Generates the item model files for Bibliocraft items with your mod's wood type(s).
      Parameters:
      provider - Your mod's ItemModelProvider.
    • generateBlockTags

      default void generateBlockTags(Function<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>,net.minecraft.data.tags.IntrinsicHolderTagsProvider.IntrinsicTagAppender<net.minecraft.world.level.block.Block>> tagAccessor)
      Generates the block tag files for Bibliocraft blocks with your mod's wood type(s).
      Parameters:
      tagAccessor - A reference to your mod's IntrinsicHolderTagsProvider.tag(TagKey) method, as it is protected for some reason.
    • generateItemTags

      default void generateItemTags(Function<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>,net.minecraft.data.tags.IntrinsicHolderTagsProvider.IntrinsicTagAppender<net.minecraft.world.item.Item>> tagAccessor)
      Generates the item tag files for Bibliocraft blocks with your mod's wood type(s).
      Parameters:
      tagAccessor - A reference to your mod's IntrinsicHolderTagsProvider.tag(TagKey) method, as it is protected for some reason.
    • generateLootTables

      default void generateLootTables(BlockLootTableProvider provider)
      Generates the loot table files for Bibliocraft blocks with your mod's wood type(s).
      Parameters:
      provider - Your mod's BlockLootTableProvider.
    • generateRecipes

      default void generateRecipes(net.minecraft.data.recipes.RecipeOutput output, String modId)
      Generates the recipe files for Bibliocraft blocks with your mod's wood type(s).
      Parameters:
      output - Your mod's RecipeOutput.
      modId - Your mod's namespace.
    • generateAll

      default void generateAll(String modId, net.neoforged.neoforge.data.event.GatherDataEvent event, net.neoforged.neoforge.common.data.LanguageProvider englishLanguageProvider, net.neoforged.neoforge.common.data.BlockTagsProvider blockTagsProvider, net.minecraft.data.tags.ItemTagsProvider itemTagsProvider)
      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.
      event - The GatherDataEvent whose handler this is called from.
      englishLanguageProvider - The LanguageProvider to use for generating english translations.
      blockTagsProvider - The BlockTagsProvider to use for generating block tags. It is strongly suggested this be a NonClearingBlockTagsProvider.
      itemTagsProvider - The ItemTagsProvider to use for generating item tags. It is strongly suggested this be a NonClearingItemTagsProvider.