Package com.minecolonies.api.quests
Interface IQuestObjectiveTemplate
- All Known Subinterfaces:
IDialogueObjectiveTemplate,IQuestDeliveryObjective
- All Known Implementing Classes:
BreakBlockObjectiveTemplate,BuildBuildingObjectiveTemplate,DeliveryObjectiveTemplateTemplate,DialogueObjectiveTemplateTemplate,KillEntityObjectiveTemplateTemplate,PlaceBlockObjectiveTemplate,ResearchObjectiveTemplate
public interface IQuestObjectiveTemplate
Quest objective interface for all objectives.
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable IObjectiveInstanceGet objective data related to the objective.net.minecraft.network.chat.ComponentgetProgressText(IQuestInstance quest, net.minecraft.network.chat.Style style) Get aComponentinstance with the text containing the progress of this objective.Get the list of reward unlocks from this objective.intGet the quest target.default voidonCancellation(IQuestInstance colonyQuest) On objective abort.default voidonWorldLoad(IQuestInstance colonyQuest) On world load trigger.@Nullable IObjectiveInstancestartObjective(IQuestInstance colonyQuest) Initialization of an objective.
-
Method Details
-
startObjective
Initialization of an objective.- Parameters:
colonyQuest- the colony quest it belongs to.- Returns:
- potentially related objective data.
-
onCancellation
On objective abort.- Parameters:
colonyQuest- related colony quest.
-
onWorldLoad
On world load trigger.- Parameters:
colonyQuest- the quest.
-
getProgressText
net.minecraft.network.chat.Component getProgressText(IQuestInstance quest, net.minecraft.network.chat.Style style) Get aComponentinstance with the text containing the progress of this objective.- Parameters:
quest- the quest to get the info from.style- the style to use on subcomponents.- Returns:
- the chat component.
-
createObjectiveInstance
Get objective data related to the objective.- Returns:
- the data, default null.
-
getRewardUnlocks
Get the list of reward unlocks from this objective.- Returns:
- the unlocked rewards by this objective.
-
getTarget
int getTarget()Get the quest target.- Returns:
- the target id.
-