Class ItemGroup

java.lang.Object
net.minecraft.item.ItemGroup

public abstract class ItemGroup
extends Object
  • Field Details

    • GROUPS

      public static final ItemGroup[] GROUPS
    • BUILDING_BLOCKS

      public static final ItemGroup BUILDING_BLOCKS
    • DECORATIONS

      public static final ItemGroup DECORATIONS
    • REDSTONE

      public static final ItemGroup REDSTONE
    • TRANSPORTATION

      public static final ItemGroup TRANSPORTATION
    • MISC

      public static final ItemGroup MISC
    • FOOD

      public static final ItemGroup FOOD
    • TOOLS

      public static final ItemGroup TOOLS
    • COMBAT

      public static final ItemGroup COMBAT
    • BREWING

      public static final ItemGroup BREWING
    • MATERIALS

      public static final ItemGroup MATERIALS
    • HOTBAR

      public static final ItemGroup HOTBAR
    • INVENTORY

      public static final ItemGroup INVENTORY
    • index

      private final int index
    • id

      private final String id
    • translationKey

      private final Text translationKey
    • name

      private String name
    • texture

      private String texture
    • scrollbar

      private boolean scrollbar
    • renderName

      private boolean renderName
    • enchantments

      private EnchantmentTarget[] enchantments
    • icon

      private ItemStack icon
  • Constructor Details

    • ItemGroup

      public ItemGroup​(int index, String id)
  • Method Details

    • getIndex

      @Environment(CLIENT) public int getIndex()
    • getName

      public String getName()
    • getTranslationKey

      @Environment(CLIENT) public Text getTranslationKey()
    • getIcon

      @Environment(CLIENT) public ItemStack getIcon()
    • createIcon

      @Environment(CLIENT) public abstract ItemStack createIcon()
    • getTexture

      @Environment(CLIENT) public String getTexture()
    • setTexture

      public ItemGroup setTexture​(String texture)
    • setName

      public ItemGroup setName​(String name)
    • shouldRenderName

      @Environment(CLIENT) public boolean shouldRenderName()
      Checks if this item group should render its name.

      The name is rendered below the top row of item groups and above the inventory.

    • hideName

      public ItemGroup hideName()
      Specifies that when this item group is selected, the name of the item group should not be rendered.
    • hasScrollbar

      @Environment(CLIENT) public boolean hasScrollbar()
    • setNoScrollbar

      public ItemGroup setNoScrollbar()
    • getColumn

      @Environment(CLIENT) public int getColumn()
    • isTopRow

      @Environment(CLIENT) public boolean isTopRow()
    • isSpecial

      @Environment(CLIENT) public boolean isSpecial()
    • getEnchantments

      public EnchantmentTarget[] getEnchantments()
    • setEnchantments

      public ItemGroup setEnchantments​(EnchantmentTarget[] targets)
    • containsEnchantments

      public boolean containsEnchantments​(@Nullable EnchantmentTarget target)
    • appendStacks

      @Environment(CLIENT) public void appendStacks​(DefaultedList<ItemStack> stacks)