java.lang.Object
top.offsetmonkey538.loottablemodifier.common.api.resource.predicate.op.AllOfPredicate
All Implemented Interfaces:
Predicate<LootModifierContext>, LootModifierPredicate

public class AllOfPredicate extends Object
Matches when all the provided predicates match
  • Field Details

  • Method Details

    • getType

      public LootModifierPredicateType getType()
      Description copied from interface: LootModifierPredicate
      Returns the type of this action.
      Returns:
      the type of this action.
    • builder

      public static AllOfPredicate.Builder builder()
      Creates a builder for AllOfPredicate
      Returns:
      a new AllOfPredicate.Builder
    • createCodec

      protected static <T extends top.offsetmonkey538.loottablemodifier.common.api.resource.predicate.op.TermsPredicate> com.mojang.serialization.MapCodec<T> createCodec(Function<List<LootModifierPredicate>,T> constructor)
      Creates a codec for the terms predicate using the provided constructor.
      Type Parameters:
      T - the terms predicate
      Parameters:
      constructor - the constructor of the predicate.
      Returns:
      a codec for the terms predicate using the provided constructor
    • test

      public boolean test(@NotNull @NotNull LootModifierContext context)
      Description copied from interface: LootModifierPredicate
      Tests this predicate against the provided context.
      Specified by:
      test in interface LootModifierPredicate
      Specified by:
      test in interface Predicate<LootModifierContext>
      Parameters:
      context - the context to match against
      Returns:
      if this predicate matched the provided context