Class ClientResearchObjective
java.lang.Object
com.pixelmonmod.pixelmon.api.storage.research.impl.client.ClientResearchObjective
- All Implemented Interfaces:
PlayerResearchObjective
-
Constructor Summary
ConstructorDescriptionClientResearchObjective
(ClientResearch parent, ClientResearchStage stage, net.minecraft.network.FriendlyByteBuf buffer) -
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
.void
write
(net.minecraft.network.FriendlyByteBuf buffer) Writes the player research objective into a buffer, for reading byClientResearchObjective
later.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
-
Constructor Details
-
ClientResearchObjective
public ClientResearchObjective(ClientResearch parent, ClientResearchStage stage, net.minecraft.network.FriendlyByteBuf buffer)
-
-
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.
-
write
public void write(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:PlayerResearchObjective
Writes the player research objective into a buffer, for reading byClientResearchObjective
later.- Specified by:
write
in interfacePlayerResearchObjective
- Parameters:
buffer
- The buffer to write to.
-