Class ConditionalLootFunction

java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>, LootContextAware, LootFunction
Direct Known Subclasses:
ApplyBonusLootFunction, CopyNameLootFunction, CopyNbtLootFunction, CopyStateFunction, EnchantRandomlyLootFunction, EnchantWithLevelsLootFunction, ExplorationMapLootFunction, ExplosionDecayLootFunction, FillPlayerHeadLootFunction, FurnaceSmeltLootFunction, LimitCountLootFunction, LootingEnchantLootFunction, ReferenceLootFunction, SetAttributesLootFunction, SetBannerPatternFunction, SetContentsLootFunction, SetCountLootFunction, SetDamageLootFunction, SetEnchantmentsLootFunction, SetInstrumentLootFunction, SetLootTableLootFunction, SetLoreLootFunction, SetNameLootFunction, SetNbtLootFunction, SetPotionLootFunction, SetStewEffectLootFunction

public abstract class ConditionalLootFunction extends Object implements LootFunction
Mappings:
Namespace Name
official eec
intermediary net/minecraft/class_120
named net/minecraft/loot/function/ConditionalLootFunction
  • Field Details

    • conditions

      protected final List<LootCondition> conditions
      Mappings:
      Namespace Name Mixin selector
      official g Leec;g:Ljava/util/List;
      intermediary field_1047 Lnet/minecraft/class_120;field_1047:Ljava/util/List;
      named conditions Lnet/minecraft/loot/function/ConditionalLootFunction;conditions:Ljava/util/List;
    • predicate

      private final Predicate<LootContext> predicate
      Mappings:
      Namespace Name Mixin selector
      official a Leec;a:Ljava/util/function/Predicate;
      intermediary field_1048 Lnet/minecraft/class_120;field_1048:Ljava/util/function/Predicate;
      named predicate Lnet/minecraft/loot/function/ConditionalLootFunction;predicate:Ljava/util/function/Predicate;
  • Constructor Details

    • ConditionalLootFunction

      protected ConditionalLootFunction(List<LootCondition> conditions)
      Mappings:
      Namespace Name Mixin selector
      official <init> Leec;<init>(Ljava/util/List;)V
      intermediary <init> Lnet/minecraft/class_120;<init>(Ljava/util/List;)V
      named <init> Lnet/minecraft/loot/function/ConditionalLootFunction;<init>(Ljava/util/List;)V
  • Method Details

    • method_53344

      protected static <T extends ConditionalLootFunction> com.mojang.datafixers.Products.P1<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<T>,List<LootCondition>> method_53344(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<T> instance)
      Mappings:
      Namespace Name Mixin selector
      official a Leec;a(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P1;
      intermediary method_53344 Lnet/minecraft/class_120;method_53344(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P1;
      named method_53344 Lnet/minecraft/loot/function/ConditionalLootFunction;method_53344(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P1;
    • apply

      public final ItemStack apply(ItemStack itemStack, LootContext lootContext)
      Specified by:
      apply in interface BiFunction<ItemStack,LootContext,ItemStack>
      Mappings:
      Namespace Name Mixin selector
      official b Leec;b(Lcjf;Lecq;)Lcjf;
      intermediary method_521 Lnet/minecraft/class_120;method_521(Lnet/minecraft/class_1799;Lnet/minecraft/class_47;)Lnet/minecraft/class_1799;
      named apply Lnet/minecraft/loot/function/ConditionalLootFunction;apply(Lnet/minecraft/item/ItemStack;Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/item/ItemStack;
    • process

      protected abstract ItemStack process(ItemStack stack, LootContext context)
      Mappings:
      Namespace Name Mixin selector
      official a Leec;a(Lcjf;Lecq;)Lcjf;
      intermediary method_522 Lnet/minecraft/class_120;method_522(Lnet/minecraft/class_1799;Lnet/minecraft/class_47;)Lnet/minecraft/class_1799;
      named process Lnet/minecraft/loot/function/ConditionalLootFunction;process(Lnet/minecraft/item/ItemStack;Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/item/ItemStack;
    • validate

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

      Mappings:
      Namespace Name Mixin selector
      official a Leec;a(Ljava/util/function/Function;)Leec$a;
      intermediary method_520 Lnet/minecraft/class_120;method_520(Ljava/util/function/Function;)Lnet/minecraft/class_120$class_121;
      named builder Lnet/minecraft/loot/function/ConditionalLootFunction;builder(Ljava/util/function/Function;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;