Interface AdvancementTree
- All Superinterfaces:
AdvancementNode
,Keyed
,ResourceKeyed
Represents a
Advancement
tree or tab menu. The tree will become
visible to a Player
once the root advancement
gets achieved.-
Method Summary
Modifier and TypeMethodDescriptionGets the background texture of this tree.layoutElement
(AdvancementTemplate advancement) Gets theTreeLayoutElement
for the specifiedAdvancement
,Optional.empty()
will be returned if the advancement is not present in the tree or if there is noDisplayInfo
present.layoutElement
(ResourceKey advancementKey) Gets theTreeLayoutElement
for the specifiedAdvancement
,Optional.empty()
will be returned if the advancement is not present in the tree or if there is noDisplayInfo
present.Gets all theTreeLayoutElement
s that are present in this layout.Methods inherited from interface org.spongepowered.api.advancement.AdvancementNode
children, rootAdvancement
Methods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
Method Details
-
backgroundPath
Optional<ResourceKey> backgroundPath()Gets the background texture of this tree.- Returns:
- The background texture
-
layoutElements
Collection<TreeLayoutElement> layoutElements()Gets all theTreeLayoutElement
s that are present in this layout.- Returns:
- The tree layout elements
-
layoutElement
Gets theTreeLayoutElement
for the specifiedAdvancement
,Optional.empty()
will be returned if the advancement is not present in the tree or if there is noDisplayInfo
present.- Parameters:
advancement
- The advancement- Returns:
- The tree layout element
-
layoutElement
Gets theTreeLayoutElement
for the specifiedAdvancement
,Optional.empty()
will be returned if the advancement is not present in the tree or if there is noDisplayInfo
present.- Parameters:
advancementKey
- The advancement key- Returns:
- The tree layout element
-