Class LootContextPredicate

java.lang.Object
net.minecraft.predicate.entity.LootContextPredicate

public class LootContextPredicate extends Object
A list of loot conditions applied to entities. All conditions must match for this unified conditions to match. Mainly used by advancements.
Mappings:
Namespace Name
official ba
intermediary net/minecraft/class_5258
named net/minecraft/predicate/entity/LootContextPredicate
  • Field Details

    • EMPTY

      public static final LootContextPredicate EMPTY
      Mappings:
      Namespace Name Mixin selector
      official a Lba;a:Lba;
      intermediary field_24388 Lnet/minecraft/class_5258;field_24388:Lnet/minecraft/class_5258;
      named EMPTY Lnet/minecraft/predicate/entity/LootContextPredicate;EMPTY:Lnet/minecraft/predicate/entity/LootContextPredicate;
    • conditions

      private final LootCondition[] conditions
      Mappings:
      Namespace Name Mixin selector
      official b Lba;b:[Leck;
      intermediary field_24389 Lnet/minecraft/class_5258;field_24389:[Lnet/minecraft/class_5341;
      named conditions Lnet/minecraft/predicate/entity/LootContextPredicate;conditions:[Lnet/minecraft/loot/condition/LootCondition;
    • combinedCondition

      private final Predicate<LootContext> combinedCondition
      Mappings:
      Namespace Name Mixin selector
      official c Lba;c:Ljava/util/function/Predicate;
      intermediary field_24390 Lnet/minecraft/class_5258;field_24390:Ljava/util/function/Predicate;
      named combinedCondition Lnet/minecraft/predicate/entity/LootContextPredicate;combinedCondition:Ljava/util/function/Predicate;
  • Constructor Details

    • LootContextPredicate

      LootContextPredicate(LootCondition[] conditions)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lba;<init>([Leck;)V
      intermediary <init> Lnet/minecraft/class_5258;<init>([Lnet/minecraft/class_5341;)V
      named <init> Lnet/minecraft/predicate/entity/LootContextPredicate;<init>([Lnet/minecraft/loot/condition/LootCondition;)V
  • Method Details

    • create

      public static LootContextPredicate create(LootCondition[] conditions)
      Mappings:
      Namespace Name Mixin selector
      official a Lba;a([Leck;)Lba;
      intermediary method_27973 Lnet/minecraft/class_5258;method_27973([Lnet/minecraft/class_5341;)Lnet/minecraft/class_5258;
      named create Lnet/minecraft/predicate/entity/LootContextPredicate;create([Lnet/minecraft/loot/condition/LootCondition;)Lnet/minecraft/predicate/entity/LootContextPredicate;
    • fromJson

      @Nullable public static @Nullable LootContextPredicate fromJson(String key, AdvancementEntityPredicateDeserializer predicateDeserializer, @Nullable @Nullable JsonElement json, LootContextType contextType)
      Mappings:
      Namespace Name Mixin selector
      official a Lba;a(Ljava/lang/String;Lbe;Lcom/google/gson/JsonElement;Lebu;)Lba;
      intermediary method_27807 Lnet/minecraft/class_5258;method_27807(Ljava/lang/String;Lnet/minecraft/class_5257;Lcom/google/gson/JsonElement;Lnet/minecraft/class_176;)Lnet/minecraft/class_5258;
      named fromJson Lnet/minecraft/predicate/entity/LootContextPredicate;fromJson(Ljava/lang/String;Lnet/minecraft/predicate/entity/AdvancementEntityPredicateDeserializer;Lcom/google/gson/JsonElement;Lnet/minecraft/loot/context/LootContextType;)Lnet/minecraft/predicate/entity/LootContextPredicate;
    • test

      public boolean test(LootContext context)
      Mappings:
      Namespace Name Mixin selector
      official a Lba;a(Ldzk;)Z
      intermediary method_27806 Lnet/minecraft/class_5258;method_27806(Lnet/minecraft/class_47;)Z
      named test Lnet/minecraft/predicate/entity/LootContextPredicate;test(Lnet/minecraft/loot/context/LootContext;)Z
    • toJson

      public JsonElement toJson(AdvancementEntityPredicateSerializer predicateSerializer)
      Mappings:
      Namespace Name Mixin selector
      official a Lba;a(Lct;)Lcom/google/gson/JsonElement;
      intermediary method_27804 Lnet/minecraft/class_5258;method_27804(Lnet/minecraft/class_5267;)Lcom/google/gson/JsonElement;
      named toJson Lnet/minecraft/predicate/entity/LootContextPredicate;toJson(Lnet/minecraft/predicate/entity/AdvancementEntityPredicateSerializer;)Lcom/google/gson/JsonElement;
    • toPredicatesJsonArray

      public static JsonElement toPredicatesJsonArray(LootContextPredicate[] predicates, AdvancementEntityPredicateSerializer predicateSerializer)
      Mappings:
      Namespace Name Mixin selector
      official a Lba;a([Lba;Lct;)Lcom/google/gson/JsonElement;
      intermediary method_27808 Lnet/minecraft/class_5258;method_27808([Lnet/minecraft/class_5258;Lnet/minecraft/class_5267;)Lcom/google/gson/JsonElement;
      named toPredicatesJsonArray Lnet/minecraft/predicate/entity/LootContextPredicate;toPredicatesJsonArray([Lnet/minecraft/predicate/entity/LootContextPredicate;Lnet/minecraft/predicate/entity/AdvancementEntityPredicateSerializer;)Lcom/google/gson/JsonElement;