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

public class AnyOfPredicate extends Object
Matches when any of 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

      @Contract("->new") public static AnyOfPredicate.Builder builder()
      Creates a builder for AnyOfPredicate
      Returns:
      a new AnyOfPredicate.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