Class PixelmonPlayerResearchObjective
java.lang.Object
com.pixelmonmod.pixelmon.api.storage.research.impl.PixelmonPlayerResearchObjective
- All Implemented Interfaces:
PlayerResearchObjective
-
Constructor Summary
ConstructorDescriptionPixelmonPlayerResearchObjective
(UUID player, ServerPlayerResearch parent, PlayerResearchStage stage, ResearchObjective objective) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Claims the reward for the objective.void
complete()
Completes the objective.void
deserialize
(net.minecraft.nbt.CompoundTag tag) Deserializes the objective from aCompoundTag
.int
int
boolean
handleInteractionEvent
(InteractionEvent event, InteractionContext context) Handles an interaction event for the objective.boolean
boolean
Gets the objective that this player research objective is for.net.minecraft.nbt.CompoundTag
Serializes the objective to aCompoundTag
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.storage.research.PlayerResearchObjective
canClaimReward, write
-
Constructor Details
-
PixelmonPlayerResearchObjective
public PixelmonPlayerResearchObjective(UUID player, ServerPlayerResearch parent, PlayerResearchStage stage, ResearchObjective objective)
-
-
Method Details
-
objective
Description copied from interface:PlayerResearchObjective
Gets the objective that this player research objective is for.- Specified by:
objective
in interfacePlayerResearchObjective
- Returns:
- The objective.
-
isComplete
public boolean isComplete()- Specified by:
isComplete
in interfacePlayerResearchObjective
- Returns:
- If the objective has been completed.
-
hasClaimedReward
public boolean hasClaimedReward()- Specified by:
hasClaimedReward
in interfacePlayerResearchObjective
- Returns:
- If the reward for the objective has been claimed.
-
getProgress
public int getProgress()- Specified by:
getProgress
in interfacePlayerResearchObjective
- Returns:
- The progress of the objective.
-
getTarget
public int getTarget()- Specified by:
getTarget
in interfacePlayerResearchObjective
- Returns:
- The target of the objective.
-
handleInteractionEvent
Description copied from interface:PlayerResearchObjective
Handles an interaction event for the objective.- Specified by:
handleInteractionEvent
in interfacePlayerResearchObjective
- Parameters:
event
- The event.context
- The context.- Returns:
- If the event was handled.
-
claimReward
public void claimReward()Description copied from interface:PlayerResearchObjective
Claims the reward for the objective.- Specified by:
claimReward
in interfacePlayerResearchObjective
-
complete
public void complete()Description copied from interface:PlayerResearchObjective
Completes the objective.- Specified by:
complete
in interfacePlayerResearchObjective
-
serialize
public net.minecraft.nbt.CompoundTag serialize()Description copied from interface:PlayerResearchObjective
Serializes the objective to aCompoundTag
.- Specified by:
serialize
in interfacePlayerResearchObjective
- Returns:
- The serialized objective.
-
deserialize
public void deserialize(net.minecraft.nbt.CompoundTag tag) Description copied from interface:PlayerResearchObjective
Deserializes the objective from aCompoundTag
.- Specified by:
deserialize
in interfacePlayerResearchObjective
- Parameters:
tag
- The tag to deserialize.
-