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, SetGoatHornSoundLootFunction, SetLootTableLootFunction, SetLoreLootFunction, SetNameLootFunction, SetNbtLootFunction, SetPotionLootFunction, SetStewEffectLootFunction

public abstract class ConditionalLootFunction extends Object implements LootFunction
Mappings:
Namespace Name
official dsq
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 Ldsq;g:[Ldua;
      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 Ldsq;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> Ldsq;<init>([Ldua;)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 Ldsq;b(Lcaa;Ldrg;)Lcaa;
      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 Ldsq;a(Lcaa;Ldrg;)Lcaa;
      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 Ldrh;a(Ldro;)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 Ldsq;a(Ljava/util/function/Function;)Ldsq$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;