java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.advancement.CriterionRegistry

@Deprecated public final class CriterionRegistry extends Object
Deprecated.
Replaced by access widener for Criteria.register(Criterion) in Fabric Transitive Access Wideners (v1).
Allows registering advancement criteria for triggers.

A registered criterion (trigger) can be retrieved through Criteria.getById(Identifier).

See Also:
  • Criteria
  • Constructor Details

    • CriterionRegistry

      public CriterionRegistry()
      Deprecated.
  • Method Details

    • register

      public static <T extends net.minecraft.advancement.criterion.Criterion<?>> T register(T criterion)
      Deprecated.
      Registers a criterion for a trigger for advancements.
      Type Parameters:
      T - the criterion's type
      Parameters:
      criterion - the criterion registered
      Returns:
      the criterion registered, for chaining
      Throws:
      IllegalArgumentException - if a criterion with the same id exists