Class PixelmonPlayerResearchObjective
java.lang.Object
com.pixelmonmod.pixelmon.api.storage.research.impl.PixelmonPlayerResearchObjective
- All Implemented Interfaces:
PlayerResearchObjective
-
Constructor Summary
ConstructorsConstructorDescriptionPixelmonPlayerResearchObjective(UUID player, ServerPlayerResearch parent, PlayerResearchStage stage, ResearchObjective objective) -
Method Summary
Modifier and TypeMethodDescriptionvoidClaims the reward for the objective.voidcomplete()Completes the objective.voiddeserialize(net.minecraft.nbt.CompoundTag tag) Deserializes the objective from aCompoundTag.intintbooleanhandleInteractionEvent(net.minecraft.core.Holder<InteractionEvent> event, StoredContext context) Handles an interaction event for the objective.booleanbooleanGets the objective that this player research objective is for.net.minecraft.nbt.CompoundTagSerializes the objective to aCompoundTag.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:PlayerResearchObjectiveGets the objective that this player research objective is for.- Specified by:
objectivein interfacePlayerResearchObjective- Returns:
- The objective.
-
isComplete
public boolean isComplete()- Specified by:
isCompletein interfacePlayerResearchObjective- Returns:
- If the objective has been completed.
-
hasClaimedReward
public boolean hasClaimedReward()- Specified by:
hasClaimedRewardin interfacePlayerResearchObjective- Returns:
- If the reward for the objective has been claimed.
-
getProgress
public int getProgress()- Specified by:
getProgressin interfacePlayerResearchObjective- Returns:
- The progress of the objective.
-
getTarget
public int getTarget()- Specified by:
getTargetin interfacePlayerResearchObjective- Returns:
- The target of the objective.
-
handleInteractionEvent
public boolean handleInteractionEvent(net.minecraft.core.Holder<InteractionEvent> event, StoredContext context) Description copied from interface:PlayerResearchObjectiveHandles an interaction event for the objective.- Specified by:
handleInteractionEventin interfacePlayerResearchObjective- Parameters:
event- The event.context- The context.- Returns:
- If the event was handled.
-
claimReward
public void claimReward()Description copied from interface:PlayerResearchObjectiveClaims the reward for the objective.- Specified by:
claimRewardin interfacePlayerResearchObjective
-
complete
public void complete()Description copied from interface:PlayerResearchObjectiveCompletes the objective.- Specified by:
completein interfacePlayerResearchObjective
-
serialize
public net.minecraft.nbt.CompoundTag serialize()Description copied from interface:PlayerResearchObjectiveSerializes the objective to aCompoundTag.- Specified by:
serializein interfacePlayerResearchObjective- Returns:
- The serialized objective.
-
deserialize
public void deserialize(net.minecraft.nbt.CompoundTag tag) Description copied from interface:PlayerResearchObjectiveDeserializes the objective from aCompoundTag.- Specified by:
deserializein interfacePlayerResearchObjective- Parameters:
tag- The tag to deserialize.
-