- Enclosing interface:
ItemStack
public static sealed interface ItemStack.Builder
-
Method Summary
Modifier and TypeMethodDescriptionamount
(int amount) build()
default ItemStack.Builder
customModelData
(List<Float> floats, List<Boolean> flags, List<String> strings, List<RGBLike> colors) default ItemStack.Builder
customName
(Component customName) default ItemStack.Builder
glowing()
default ItemStack.Builder
glowing
(boolean glowing) Hides all components which append tooltip lines usingDataComponents.TOOLTIP_DISPLAY
.default ItemStack.Builder
default ItemStack.Builder
default ItemStack.Builder
default ItemStack.Builder
maxStackSize
(int maxStackSize) remove
(DataComponent<?> component) default ItemStack.Builder
set
(DataComponent<Unit> component) set
(DataComponent<T> component, T value) default <T> void
-
Method Details
-
material
-
amount
-
set
-
set
-
remove
-
customName
-
lore
-
lore
-
itemModel
-
customModelData
-
glowing
-
glowing
-
maxStackSize
-
hideExtraTooltip
ItemStack.Builder hideExtraTooltip()Hides all components which append tooltip lines using
DataComponents.TOOLTIP_DISPLAY
. The result should be an item with only name and lore. -
set
-
setTag
-
build
-