Class AdvancementProgress

java.lang.Object
eu.endercentral.crazy_advancements.advancement.progress.AdvancementProgress

public class AdvancementProgress extends Object
Represents the progress a Player has made for a specific Advancement
Author:
Axel
  • Constructor Details

    • AdvancementProgress

      @Deprecated(forRemoval=true, since="2.1.15") public AdvancementProgress(Map<String,net.minecraft.advancements.Criterion<?>> criteria, String[][] requirements)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use AdvancementProgress(String[][] requirements) instead
      Constructor for Creating a Progress Instance
      Parameters:
      criteria - The Criteria
      requirements - The Requirements
    • AdvancementProgress

      public AdvancementProgress(String[][] requirements)
      Constructor for Creating a Progress Instance
      Parameters:
      criteria - The Criteria
      requirements - The Requirements
  • Method Details

    • grant

      public GenericResult grant()
      Grants the Advancement, does not update for the player
      Returns:
      The result of this oepration
    • revoke

      public GenericResult revoke()
      Revokes the Advancemnt, does not update for the player
      Returns:
      The result of this operation
    • grantCriteria

      public GrantCriteriaResult grantCriteria(String... criteria)
      Grants Criteria, does not update for the player
      Parameters:
      criteria - The Criteria to grant
      Returns:
      The result of this operation
    • revokeCriteria

      public GenericResult revokeCriteria(String... criteria)
      Revokes Criteria, does not update for the player
      Parameters:
      criteria - The Criteria to revoke
      Returns:
      The result of this operation
    • setCriteriaProgress

      public SetCriteriaResult setCriteriaProgress(int number)
      Sets Criteria, does not update for the player
      Parameters:
      number - The Criteria to set
      Returns:
      The result of this operation
    • getRemainingCriteria

      public Iterable<String> getRemainingCriteria()
      Gets the remaining Criteria
      Returns:
      The remaining Criteria
    • getAwardedCriteria

      public Iterable<String> getAwardedCriteria()
      Gets the awarded Criteria
      Returns:
      The awarded Criteria
    • getCriteriaProgress

      public int getCriteriaProgress()
      Gets the Criteria Progress
      Returns:
      The Criteria Progress
    • getCriterionProgress

      public net.minecraft.advancements.CriterionProgress getCriterionProgress(String name)
      Gets the Criterion Progress Instance by it's name
      Parameters:
      name - The Criterion Name
      Returns:
      The CriterionProgress
    • isDone

      public boolean isDone()
      Checks whether the Progress is Done
      Returns:
      Whether the Progress is Done
    • getNmsProgress

      public net.minecraft.advancements.AdvancementProgress getNmsProgress()
      Gets the nms progress instance
      Returns:
      The nms progress instance
    • getLastUpdate

      public long getLastUpdate()
      Gets the timestamp for the last update or -1 if it has not been updated yet
      Returns:
      The timestamp in milliseconds or -1 if it has not been updated yet
    • setLastUpdate

      public void setLastUpdate()
      Sets the timestamp for the last update to the current system time