Class GuideObjective
java.lang.Object
net.ixdarklord.folios.api.client.GuideObjective
Something the player makes progress on, shown with a bar: an objective of a quest page, and what a quest's entry
shows on its row. In JSON it is an object naming what it follows, with an optional
"label" (text with marks,
or a translation key) in place of the one it makes for itself:
{"advancement": "minecraft:story/mine_stone"}: done once the advancement is;{"read": "basics/first_steps"}: an entry of the book read;{"category": "basics"}: how much of a category has been read;{"book": true}: how much of the whole book has been read;{"flag": "mymod:met_the_wizard"}: a flag set in code (Guides.setFlag(String, BooleanSupplier));{"item": "minecraft:diamond", "count": 5}: items carried (an item, a#tagor a list);{"source": "mymod:mana", "goal": 100}: a value a mod reports (GuideObjectives.register(Identifier, GuideObjectives.Source)), done when it reaches the goal.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether it is done or not done, with nothing between: no bar of its own is shown for it.boolean@Nullable GuideStackitems()The items it counts, for an icon; null for objectives that aren't about items.net.minecraft.network.chat.ComponentWhat it says, with how far along it is where that is a count.floatHow far along it is, 0 to 1.static floatprogress(GuideBook book, List<GuideObjective> objectives) How far along several objectives are together: the average of each.
-
Field Details
-
CODEC
-
-
Method Details
-
progress
How far along it is, 0 to 1. -
isDone
-
isAllOrNothing
public boolean isAllOrNothing()Whether it is done or not done, with nothing between: no bar of its own is shown for it. -
label
What it says, with how far along it is where that is a count. -
items
The items it counts, for an icon; null for objectives that aren't about items. -
progress
How far along several objectives are together: the average of each.
-