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 theTreeLayoutElementfor the specifiedAdvancement,Optional.empty()will be returned if the advancement is not present in the tree or if there is noDisplayInfopresent.layoutElement(ResourceKey advancementKey) Gets theTreeLayoutElementfor the specifiedAdvancement,Optional.empty()will be returned if the advancement is not present in the tree or if there is noDisplayInfopresent.Gets all theTreeLayoutElements that are present in this layout.Methods inherited from interface org.spongepowered.api.advancement.AdvancementNode
children, rootAdvancementMethods 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 theTreeLayoutElements that are present in this layout.- Returns:
- The tree layout elements
-
layoutElement
Gets theTreeLayoutElementfor the specifiedAdvancement,Optional.empty()will be returned if the advancement is not present in the tree or if there is noDisplayInfopresent.- Parameters:
advancement- The advancement- Returns:
- The tree layout element
-
layoutElement
Gets theTreeLayoutElementfor the specifiedAdvancement,Optional.empty()will be returned if the advancement is not present in the tree or if there is noDisplayInfopresent.- Parameters:
advancementKey- The advancement key- Returns:
- The tree layout element
-