public static interface DisplayInfo.Builder extends ResettableBuilder<DisplayInfo,DisplayInfo.Builder>
DisplayInfo
s.Modifier and Type | Method and Description |
---|---|
DisplayInfo.Builder |
announceToChat(boolean announceToChat)
Sets whether a notification should be shown in the global chat.
|
DisplayInfo |
build()
Builds the
DisplayInfo . |
DisplayInfo.Builder |
description(Text description)
Sets the description.
|
DisplayInfo.Builder |
hidden(boolean hidden)
Sets whether the
Advancement should be hidden. |
default DisplayInfo.Builder |
icon(ItemStack itemStack)
Sets the icon of the advancement with the
specified
ItemStack . |
DisplayInfo.Builder |
icon(ItemStackSnapshot itemStackSnapshot)
Sets the icon of the advancement with the
specified
ItemStackSnapshot . |
default DisplayInfo.Builder |
icon(ItemType itemType)
Sets the icon of the advancement with the
specified
ItemType . |
DisplayInfo.Builder |
showToast(boolean showToast)
Sets whether a toast should be shown.
|
DisplayInfo.Builder |
title(Text title)
Sets the title.
|
DisplayInfo.Builder |
type(AdvancementType advancementType)
Sets the
AdvancementType . |
from, reset
DisplayInfo.Builder type(AdvancementType advancementType)
AdvancementType
. Defaults
to AdvancementTypes.TASK
.advancementType
- The advancement typeDisplayInfo.Builder description(Text description)
Text.EMPTY
.description
- The descriptionDisplayInfo.Builder title(Text title)
title
- The titledefault DisplayInfo.Builder icon(ItemType itemType)
ItemType
.itemType
- The item typedefault DisplayInfo.Builder icon(ItemStack itemStack)
ItemStack
.itemStack
- The item stackDisplayInfo.Builder icon(ItemStackSnapshot itemStackSnapshot)
ItemStackSnapshot
.itemStackSnapshot
- The item stack snapshotDisplayInfo.Builder showToast(boolean showToast)
Defaults to true
.
showToast
- Whether a toast should be shownDisplayInfo.Builder announceToChat(boolean announceToChat)
Defaults to true
.
announceToChat
- Whether a notification should be shown in
the chatDisplayInfo.Builder hidden(boolean hidden)
Advancement
should be hidden.
Hidden advancements will only appear in the tree once they are unlocked. The lines that connect them to other advancements are still present.
hidden
- Is hiddenDisplayInfo build()
DisplayInfo
.