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