Class CreativeModeTabAdapter

java.lang.Object
net.darkhax.bookshelf.common.api.registry.adapters.GameRegistryAdapter<net.minecraft.world.item.CreativeModeTab>
net.darkhax.bookshelf.common.impl.registry.adapter.CreativeModeTabAdapter
All Implemented Interfaces:
RegistryAdapter<net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab>, net.minecraft.world.item.CreativeModeTab>

public class CreativeModeTabAdapter extends GameRegistryAdapter<net.minecraft.world.item.CreativeModeTab>
  • Constructor Details

    • CreativeModeTabAdapter

      public CreativeModeTabAdapter(RegistrationContext context, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<net.minecraft.world.item.CreativeModeTab>> regKey, BiConsumer<net.minecraft.resources.ResourceKey<net.minecraft.world.item.CreativeModeTab>, Supplier<net.minecraft.world.item.CreativeModeTab>> registryFunc)
  • Method Details

    • add

      public void add(String key, Supplier<net.minecraft.world.item.ItemStack> icon, net.minecraft.world.item.CreativeModeTab.DisplayItemsGenerator display)
      Adds a new creative mode tab to the game. The title will be based on the registry ID of the tab.
      Parameters:
      key - The ID to register the value under. This ID only needs to be unique within your namespace.
      icon - An item to display as the icon for the tab.
      display - Generates the items to display in the tab.
    • add

      public void add(String key, Consumer<net.minecraft.world.item.CreativeModeTab.Builder> builderFunc)
      Adds a new creative mode tab to the game.
      Parameters:
      key - The ID to register the value under. This ID only needs to be unique within your namespace.
      builderFunc - A creative mode tab builder.