Interface PlayerResearchStage

All Known Implementing Classes:
ClientResearchStage, PixelmonPlayerResearchStage

public interface PlayerResearchStage
Represents a stage of research that a player is currently on.
This is used to track the player's progress through the research.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Whether the player can claim the reward for this stage of research.
    void
    Claims the reward for this stage of research.
    void
    Completes this stage of research.
    The objectives that the player has to complete in this stage of research.
    void
    deserialize(net.minecraft.nbt.CompoundTag tag)
    Deserializes this stage of research from a CompoundTag.
    boolean
    Handles an interaction event that the player has with the research.
    boolean
    Whether the player has claimed the reward for this stage of research.
    boolean
    Whether the player has completed this stage of research.
    net.minecraft.nbt.CompoundTag
    Serializes this stage of research to a CompoundTag.
    The research stage that this player is currently on.
    default void
    write(net.minecraft.network.FriendlyByteBuf buffer)
    Writes the player research stage into a buffer, for reading by ClientResearchStage later.
  • Method Details

    • stage

      ResearchStage stage()
      The research stage that this player is currently on.
      Returns:
      The research stage that this player is currently on.
    • isComplete

      boolean isComplete()
      Whether the player has completed this stage of research.
      Returns:
      Whether the player has completed this stage of research.
    • hasClaimedReward

      boolean hasClaimedReward()
      Whether the player has claimed the reward for this stage of research.
      Returns:
      Whether the player has claimed the reward for this stage of research.
    • canClaimReward

      default boolean canClaimReward()
      Whether the player can claim the reward for this stage of research.
      Returns:
      Whether the player can claim the reward for this stage of research.
    • currentObjectives

      List<PlayerResearchObjective> currentObjectives()
      The objectives that the player has to complete in this stage of research.
      Returns:
      The objectives that the player has to complete in this stage of research.
    • handleInteractionEvent

      boolean handleInteractionEvent(InteractionEvent event, InteractionContext context)
      Handles an interaction event that the player has with the research.
      Parameters:
      event - The event that the player interacted with.
      context - The context of the interaction.
      Returns:
      If the event caused the research to progress (not complete)
    • complete

      void complete()
      Completes this stage of research.
    • claimReward

      void claimReward()
      Claims the reward for this stage of research.
    • serialize

      net.minecraft.nbt.CompoundTag serialize()
      Serializes this stage of research to a CompoundTag.
      Returns:
      The serialized stage of research.
    • deserialize

      void deserialize(net.minecraft.nbt.CompoundTag tag)
      Deserializes this stage of research from a CompoundTag.
      Parameters:
      tag - The serialized stage of research.
    • write

      default void write(net.minecraft.network.FriendlyByteBuf buffer)
      Writes the player research stage into a buffer, for reading by ClientResearchStage later.
      Parameters:
      buffer - The buffer to write to.