Class ConditionalLootFunction

java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>, LootContextAware, LootFunction
Direct Known Subclasses:
ApplyBonusLootFunction, CopyComponentsLootFunction, CopyNameLootFunction, CopyNbtLootFunction, CopyStateLootFunction, EnchantedCountIncreaseLootFunction, EnchantRandomlyLootFunction, EnchantWithLevelsLootFunction, ExplorationMapLootFunction, ExplosionDecayLootFunction, FillPlayerHeadLootFunction, FilteredLootFunction, FurnaceSmeltLootFunction, LimitCountLootFunction, ModifyContentsLootFunction, ReferenceLootFunction, SetAttributesLootFunction, SetBannerPatternLootFunction, SetBookCoverLootFunction, SetComponentsLootFunction, SetContentsLootFunction, SetCountLootFunction, SetCustomDataLootFunction, SetCustomModelDataLootFunction, SetDamageLootFunction, SetEnchantmentsLootFunction, SetFireworkExplosionLootFunction, SetFireworksLootFunction, SetInstrumentLootFunction, SetItemLootFunction, SetLootTableLootFunction, SetLoreLootFunction, SetNameLootFunction, SetOminousBottleAmplifierLootFunction, SetPotionLootFunction, SetStewEffectLootFunction, SetWritableBookPagesLootFunction, SetWrittenBookPagesLootFunction, ToggleTooltipsLootFunction

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

    • conditions

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

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

    • ConditionalLootFunction

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

    • getType

      public abstract LootFunctionType<? extends ConditionalLootFunction> getType()
      Specified by:
      getType in interface LootFunction
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/loot/function/LootFunction;getType()Lnet/minecraft/loot/function/LootFunctionType;
      intermediary method_29321 Lnet/minecraft/class_117;method_29321()Lnet/minecraft/class_5339;
      official b Leyc;b()Leyd;
    • addConditionsField

      protected static <T extends ConditionalLootFunction> com.mojang.datafixers.Products.P1<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<T>,List<LootCondition>> addConditionsField(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<T> instance)
      Mappings:
      Namespace Name Mixin selector
      named addConditionsField Lnet/minecraft/loot/function/ConditionalLootFunction;addConditionsField(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;
      official a Leyb;a(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
      named apply Lnet/minecraft/loot/function/ConditionalLootFunction;apply(Lnet/minecraft/item/ItemStack;Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/item/ItemStack;
      intermediary method_521 Lnet/minecraft/class_120;method_521(Lnet/minecraft/class_1799;Lnet/minecraft/class_47;)Lnet/minecraft/class_1799;
      official b Leyb;b(Lcxo;Lewo;)Lcxo;
    • process

      protected abstract ItemStack process(ItemStack stack, LootContext context)
      Mappings:
      Namespace Name Mixin selector
      named process Lnet/minecraft/loot/function/ConditionalLootFunction;process(Lnet/minecraft/item/ItemStack;Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/item/ItemStack;
      intermediary method_522 Lnet/minecraft/class_120;method_522(Lnet/minecraft/class_1799;Lnet/minecraft/class_47;)Lnet/minecraft/class_1799;
      official a Leyb;a(Lcxo;Lewo;)Lcxo;
    • 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 Lewp;a(Lewu;)V
    • builder

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