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, SetAttributesLootFunction, SetBannerPatternFunction, SetContentsLootFunction, SetCountLootFunction, SetDamageLootFunction, SetEnchantmentsLootFunction, SetLootTableLootFunction, SetLoreLootFunction, SetNameLootFunction, SetNbtLootFunction, SetPotionLootFunction, SetStewEffectLootFunction

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

    • conditions

      protected final LootCondition[] conditions
      Mappings:
      Namespace Name Mixin selector
      official g Ldkx;g:[Ldmg;
      intermediary field_1047 Lnet/minecraft/class_120;field_1047:[Lnet/minecraft/class_5341;
      named conditions Lnet/minecraft/loot/function/ConditionalLootFunction;conditions:[Lnet/minecraft/loot/condition/LootCondition;
    • predicate

      private final Predicate<LootContext> predicate
      Mappings:
      Namespace Name Mixin selector
      official a Ldkx;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(LootCondition[] conditions)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldkx;<init>([Ldmg;)V
      intermediary <init> Lnet/minecraft/class_120;<init>([Lnet/minecraft/class_5341;)V
      named <init> Lnet/minecraft/loot/function/ConditionalLootFunction;<init>([Lnet/minecraft/loot/condition/LootCondition;)V
  • Method Details

    • 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 Ldkx;b(Lbtx;Ldjn;)Lbtx;
      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 Ldkx;a(Lbtx;Ldjn;)Lbtx;
      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 Ldjo;a(Ldjv;)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

      protected static ConditionalLootFunction.Builder<?> builder(Function<LootCondition[],LootFunction> joiner)
      Mappings:
      Namespace Name Mixin selector
      official a Ldkx;a(Ljava/util/function/Function;)Ldkx$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;