java.lang.Object
com.pixelmonmod.pixelmon.api.storage.research.impl.client.ClientResearchStage
All Implemented Interfaces:
PlayerResearchStage

public class ClientResearchStage extends Object implements PlayerResearchStage
  • Constructor Details

    • ClientResearchStage

      public ClientResearchStage(ClientResearch parent, net.minecraft.network.FriendlyByteBuf buffer)
  • Method Details

    • stage

      public ResearchStage stage()
      Description copied from interface: PlayerResearchStage
      The research stage that this player is currently on.
      Specified by:
      stage in interface PlayerResearchStage
      Returns:
      The research stage that this player is currently on.
    • isComplete

      public boolean isComplete()
      Description copied from interface: PlayerResearchStage
      Whether the player has completed this stage of research.
      Specified by:
      isComplete in interface PlayerResearchStage
      Returns:
      Whether the player has completed this stage of research.
    • hasClaimedReward

      public boolean hasClaimedReward()
      Description copied from interface: PlayerResearchStage
      Whether the player has claimed the reward for this stage of research.
      Specified by:
      hasClaimedReward in interface PlayerResearchStage
      Returns:
      Whether the player has claimed the reward for this stage of research.
    • currentObjectives

      public List<PlayerResearchObjective> currentObjectives()
      Description copied from interface: PlayerResearchStage
      The objectives that the player has to complete in this stage of research.
      Specified by:
      currentObjectives in interface PlayerResearchStage
      Returns:
      The objectives that the player has to complete in this stage of research.
    • currentObjectivesClient

      public List<ClientResearchObjective> currentObjectivesClient()
    • handleInteractionEvent

      public boolean handleInteractionEvent(InteractionEvent event, InteractionContext context)
      Description copied from interface: PlayerResearchStage
      Handles an interaction event that the player has with the research.
      Specified by:
      handleInteractionEvent in interface PlayerResearchStage
      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

      public void complete()
      Description copied from interface: PlayerResearchStage
      Completes this stage of research.
      Specified by:
      complete in interface PlayerResearchStage
    • claimReward

      public void claimReward()
      Description copied from interface: PlayerResearchStage
      Claims the reward for this stage of research.
      Specified by:
      claimReward in interface PlayerResearchStage
    • serialize

      public net.minecraft.nbt.CompoundTag serialize()
      Description copied from interface: PlayerResearchStage
      Serializes this stage of research to a CompoundTag.
      Specified by:
      serialize in interface PlayerResearchStage
      Returns:
      The serialized stage of research.
    • deserialize

      public void deserialize(net.minecraft.nbt.CompoundTag tag)
      Description copied from interface: PlayerResearchStage
      Deserializes this stage of research from a CompoundTag.
      Specified by:
      deserialize in interface PlayerResearchStage
      Parameters:
      tag - The serialized stage of research.
    • write

      public void write(net.minecraft.network.FriendlyByteBuf buffer)
      Description copied from interface: PlayerResearchStage
      Writes the player research stage into a buffer, for reading by ClientResearchStage later.
      Specified by:
      write in interface PlayerResearchStage
      Parameters:
      buffer - The buffer to write to.