public abstract class ItemGroup extends Object
Modifier and Type | Field and Description |
---|---|
static ItemGroup |
BREWING |
static ItemGroup |
BUILDING_BLOCKS |
static ItemGroup |
COMBAT |
static ItemGroup |
DECORATIONS |
private EnchantmentTarget[] |
enchantments |
static ItemGroup |
FOOD |
static ItemGroup[] |
GROUPS |
static ItemGroup |
HOTBAR |
private ItemStack |
icon |
private String |
id |
private int |
index |
static ItemGroup |
INVENTORY |
static ItemGroup |
MATERIALS |
static ItemGroup |
MISC |
private String |
name |
static ItemGroup |
REDSTONE |
private boolean |
renderName |
private boolean |
scrollbar |
static ItemGroup |
SEARCH |
private String |
texture |
static ItemGroup |
TOOLS |
private Text |
translationKey |
static ItemGroup |
TRANSPORTATION |
Modifier and Type | Method and Description |
---|---|
void |
appendStacks(DefaultedList<ItemStack> stacks) |
boolean |
containsEnchantments(EnchantmentTarget target) |
abstract ItemStack |
createIcon() |
int |
getColumn() |
EnchantmentTarget[] |
getEnchantments() |
ItemStack |
getIcon() |
int |
getIndex() |
String |
getName() |
String |
getTexture() |
Text |
getTranslationKey() |
boolean |
hasScrollbar() |
ItemGroup |
hideName()
Specifies that when this item group is selected, the name of the item group should not be rendered.
|
boolean |
isSpecial() |
boolean |
isTopRow() |
ItemGroup |
setEnchantments(EnchantmentTarget[] targets) |
ItemGroup |
setName(String name) |
ItemGroup |
setNoScrollbar() |
ItemGroup |
setTexture(String texture) |
boolean |
shouldRenderName()
Checks if this item group should render its name.
|
public static final ItemGroup[] GROUPS
public static final ItemGroup BUILDING_BLOCKS
public static final ItemGroup DECORATIONS
public static final ItemGroup REDSTONE
public static final ItemGroup TRANSPORTATION
public static final ItemGroup MISC
public static final ItemGroup SEARCH
public static final ItemGroup FOOD
public static final ItemGroup TOOLS
public static final ItemGroup COMBAT
public static final ItemGroup BREWING
public static final ItemGroup MATERIALS
public static final ItemGroup HOTBAR
public static final ItemGroup INVENTORY
private final int index
private final String id
private final Text translationKey
private String name
private String texture
private boolean scrollbar
private boolean renderName
private EnchantmentTarget[] enchantments
private ItemStack icon
public ItemGroup(int index, String id)
@Environment(value=CLIENT) public int getIndex()
public String getName()
@Environment(value=CLIENT) public Text getTranslationKey()
@Environment(value=CLIENT) public ItemStack getIcon()
@Environment(value=CLIENT) public abstract ItemStack createIcon()
@Environment(value=CLIENT) public String getTexture()
@Environment(value=CLIENT) public boolean shouldRenderName()
The name is rendered below the top row of item groups and above the inventory.
public ItemGroup hideName()
@Environment(value=CLIENT) public boolean hasScrollbar()
public ItemGroup setNoScrollbar()
@Environment(value=CLIENT) public int getColumn()
@Environment(value=CLIENT) public boolean isTopRow()
@Environment(value=CLIENT) public boolean isSpecial()
public EnchantmentTarget[] getEnchantments()
public ItemGroup setEnchantments(EnchantmentTarget[] targets)
public boolean containsEnchantments(@Nullable EnchantmentTarget target)
@Environment(value=CLIENT) public void appendStacks(DefaultedList<ItemStack> stacks)