Class AlternativeLootCondition

java.lang.Object
net.minecraft.loot.condition.AlternativeLootCondition
All Implemented Interfaces:
Predicate<LootContext>, LootCondition, LootContextAware
Direct Known Subclasses:
AllOfLootCondition, AnyOfLootCondition

public abstract class AlternativeLootCondition extends Object implements LootCondition
Mappings:
Namespace Name
named net/minecraft/loot/condition/AlternativeLootCondition
intermediary net/minecraft/class_186
official etx
  • Field Details

    • terms

      protected final List<LootCondition> terms
      Mappings:
      Namespace Name Mixin selector
      named terms Lnet/minecraft/loot/condition/AlternativeLootCondition;terms:Ljava/util/List;
      intermediary field_1246 Lnet/minecraft/class_186;field_1246:Ljava/util/List;
      official c Letx;c:Ljava/util/List;
    • predicate

      private final Predicate<LootContext> predicate
      Mappings:
      Namespace Name Mixin selector
      named predicate Lnet/minecraft/loot/condition/AlternativeLootCondition;predicate:Ljava/util/function/Predicate;
      intermediary field_1247 Lnet/minecraft/class_186;field_1247:Ljava/util/function/Predicate;
      official a Letx;a:Ljava/util/function/Predicate;
  • Constructor Details

    • AlternativeLootCondition

      protected AlternativeLootCondition(List<LootCondition> terms, Predicate<LootContext> predicate)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/loot/condition/AlternativeLootCondition;<init>(Ljava/util/List;Ljava/util/function/Predicate;)V
      intermediary <init> Lnet/minecraft/class_186;<init>(Ljava/util/List;Ljava/util/function/Predicate;)V
      official <init> Letx;<init>(Ljava/util/List;Ljava/util/function/Predicate;)V
  • Method Details

    • createCodec

      protected static <T extends AlternativeLootCondition> com.mojang.serialization.MapCodec<T> createCodec(Function<List<LootCondition>,T> termsToCondition)
      Mappings:
      Namespace Name Mixin selector
      named createCodec Lnet/minecraft/loot/condition/AlternativeLootCondition;createCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;
      intermediary method_53407 Lnet/minecraft/class_186;method_53407(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;
      official a Letx;a(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;
    • createInlineCodec

      protected static <T extends AlternativeLootCondition> com.mojang.serialization.Codec<T> createInlineCodec(Function<List<LootCondition>,T> termsToCondition)
      Mappings:
      Namespace Name Mixin selector
      named createInlineCodec Lnet/minecraft/loot/condition/AlternativeLootCondition;createInlineCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      intermediary method_53410 Lnet/minecraft/class_186;method_53410(Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      official b Letx;b(Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
    • test

      public final boolean test(LootContext lootContext)
      Specified by:
      test in interface Predicate<LootContext>
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/loot/condition/AlternativeLootCondition;test(Lnet/minecraft/loot/context/LootContext;)Z
      intermediary method_825 Lnet/minecraft/class_186;method_825(Lnet/minecraft/class_47;)Z
      official a Letx;a(Leqw;)Z
    • validate

      public void validate(LootTableReporter reporter)
      Specified by:
      validate in interface LootContextAware
      Mappings:
      Namespace Name Mixin selector
      named validate Lnet/minecraft/loot/context/LootContextAware;validate(Lnet/minecraft/loot/LootTableReporter;)V
      intermediary method_292 Lnet/minecraft/class_46;method_292(Lnet/minecraft/class_58;)V
      official a Leqx;a(Lerc;)V