Class BookshelfContent

java.lang.Object
net.darkhax.bookshelf.common.impl.BookshelfContent
All Implemented Interfaces:
ContentProvider

public class BookshelfContent extends Object implements ContentProvider
  • Constructor Details

    • BookshelfContent

      public BookshelfContent()
  • Method Details

    • defineIngredientTypes

      public void defineIngredientTypes(IngredientTypeAdapter registry)
      Description copied from interface: ContentProvider
      Registers new ingredient types with the game.
      Specified by:
      defineIngredientTypes in interface ContentProvider
      Parameters:
      registry - Adapts registry requests to the current mod loader.
    • defineCommands

      public void defineCommands(com.mojang.brigadier.CommandDispatcher<net.minecraft.commands.CommandSourceStack> dispatcher, net.minecraft.commands.CommandBuildContext context, net.minecraft.commands.Commands.CommandSelection selection)
      Description copied from interface: ContentProvider
      Registers new commands with the game. This may happen multiple times per game instance depending on user actions.
      Specified by:
      defineCommands in interface ContentProvider
      Parameters:
      dispatcher - The command dispatcher to populate with your new commands.
      context - Context used to build commands.
      selection - The type of commands that should be registered.
    • defineCommandArguments

      public void defineCommandArguments(CommandArgumentAdapter registry)
      Description copied from interface: ContentProvider
      Registers new command argument types with the game.
      Specified by:
      defineCommandArguments in interface ContentProvider
      Parameters:
      registry - Adapts registry requests to the current mod loader.
    • defineLoadConditions

      public void defineLoadConditions(GenericRegistryAdapter<com.mojang.serialization.MapCodec<? extends ILoadCondition>> registry)
      Description copied from interface: ContentProvider
      Registers a new bookshelf load condition for JSON resources.
      Specified by:
      defineLoadConditions in interface ContentProvider
      Parameters:
      registry - Accepts registry requests.
    • defineCriteriaTriggers

      public void defineCriteriaTriggers(GameRegistryAdapter<net.minecraft.advancements.CriterionTrigger<?>> registry)
      Description copied from interface: ContentProvider
      Registers new criteria triggers with the game.
      Specified by:
      defineCriteriaTriggers in interface ContentProvider
      Parameters:
      registry - Adapts registry requests to the current mod loader.
    • defineLootEntryTypes

      public void defineLootEntryTypes(GameRegistryAdapter<com.mojang.serialization.MapCodec<? extends net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer>> registry)
      Description copied from interface: ContentProvider
      Registers new loot entry types with the game.
      Specified by:
      defineLootEntryTypes in interface ContentProvider
      Parameters:
      registry - Adapts registry requests to the current mod loader.
    • defineLootDescriptions

      public void defineLootDescriptions(LootDescriptionAdapter registry)
      Description copied from interface: ContentProvider
      Registers a new descriptor for loot entries.
      Specified by:
      defineLootDescriptions in interface ContentProvider
      Parameters:
      registry - Accepts registry requests.
    • namespace

      public String namespace()
      Description copied from interface: ContentProvider
      Gets the namespace that all content from the provider should be registered under. This MUST be the same modid that is used by your NeoForge/Fabric mod.
      Specified by:
      namespace in interface ContentProvider
      Returns:
      The namespace to register content with.