Class ApplyBonusLootFunction

java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
net.minecraft.loot.function.ApplyBonusLootFunction
All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>, LootContextAware, LootFunction

public class ApplyBonusLootFunction extends ConditionalLootFunction
Mappings:
Namespace Name
official edq
intermediary net/minecraft/class_94
named net/minecraft/loot/function/ApplyBonusLootFunction
  • Field Details

    • FACTORIES

      private static final Map<Identifier,ApplyBonusLootFunction.Type> FACTORIES
      Mappings:
      Namespace Name Mixin selector
      official b Ledq;b:Ljava/util/Map;
      intermediary field_1010 Lnet/minecraft/class_94;field_1010:Ljava/util/Map;
      named FACTORIES Lnet/minecraft/loot/function/ApplyBonusLootFunction;FACTORIES:Ljava/util/Map;
    • field_45807

      static final com.mojang.serialization.Codec<ApplyBonusLootFunction.Type> field_45807
      Mappings:
      Namespace Name Mixin selector
      official c Ledq;c:Lcom/mojang/serialization/Codec;
      intermediary field_45807 Lnet/minecraft/class_94;field_45807:Lcom/mojang/serialization/Codec;
      named field_45807 Lnet/minecraft/loot/function/ApplyBonusLootFunction;field_45807:Lcom/mojang/serialization/Codec;
    • field_45808

      private static final com.mojang.serialization.MapCodec<ApplyBonusLootFunction.Formula> field_45808
      Mappings:
      Namespace Name Mixin selector
      official d Ledq;d:Lcom/mojang/serialization/MapCodec;
      intermediary field_45808 Lnet/minecraft/class_94;field_45808:Lcom/mojang/serialization/MapCodec;
      named field_45808 Lnet/minecraft/loot/function/ApplyBonusLootFunction;field_45808:Lcom/mojang/serialization/MapCodec;
    • CODEC

      public static final com.mojang.serialization.Codec<ApplyBonusLootFunction> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Ledq;a:Lcom/mojang/serialization/Codec;
      intermediary field_45806 Lnet/minecraft/class_94;field_45806:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/loot/function/ApplyBonusLootFunction;CODEC:Lcom/mojang/serialization/Codec;
    • enchantment

      private final RegistryEntry<Enchantment> enchantment
      Mappings:
      Namespace Name Mixin selector
      official e Ledq;e:Lhe;
      intermediary field_1011 Lnet/minecraft/class_94;field_1011:Lnet/minecraft/class_6880;
      named enchantment Lnet/minecraft/loot/function/ApplyBonusLootFunction;enchantment:Lnet/minecraft/registry/entry/RegistryEntry;
    • formula

      private final ApplyBonusLootFunction.Formula formula
      Mappings:
      Namespace Name Mixin selector
      official f Ledq;f:Ledq$b;
      intermediary field_1009 Lnet/minecraft/class_94;field_1009:Lnet/minecraft/class_94$class_96;
      named formula Lnet/minecraft/loot/function/ApplyBonusLootFunction;formula:Lnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;
  • Constructor Details

    • ApplyBonusLootFunction

      private ApplyBonusLootFunction(List<LootCondition> conditions, RegistryEntry<Enchantment> enchantment, ApplyBonusLootFunction.Formula formula)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ledq;<init>(Ljava/util/List;Lhe;Ledq$b;)V
      intermediary <init> Lnet/minecraft/class_94;<init>(Ljava/util/List;Lnet/minecraft/class_6880;Lnet/minecraft/class_94$class_96;)V
      named <init> Lnet/minecraft/loot/function/ApplyBonusLootFunction;<init>(Ljava/util/List;Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;)V
  • Method Details

    • getType

      public LootFunctionType getType()
      Mappings:
      Namespace Name Mixin selector
      official b Leed;b()Leee;
      intermediary method_29321 Lnet/minecraft/class_117;method_29321()Lnet/minecraft/class_5339;
      named getType Lnet/minecraft/loot/function/LootFunction;getType()Lnet/minecraft/loot/function/LootFunctionType;
    • getRequiredParameters

      public Set<LootContextParameter<?>> getRequiredParameters()
      Mappings:
      Namespace Name Mixin selector
      official a Lecr;a()Ljava/util/Set;
      intermediary method_293 Lnet/minecraft/class_46;method_293()Ljava/util/Set;
      named getRequiredParameters Lnet/minecraft/loot/context/LootContextAware;getRequiredParameters()Ljava/util/Set;
    • process

      public ItemStack process(ItemStack stack, LootContext context)
      Specified by:
      process in class ConditionalLootFunction
      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;
    • binomialWithBonusCount

      public static ConditionalLootFunction.Builder<?> binomialWithBonusCount(Enchantment enchantment, float probability, int extra)
      Mappings:
      Namespace Name Mixin selector
      official a Ledq;a(Lcno;FI)Leec$a;
      intermediary method_463 Lnet/minecraft/class_94;method_463(Lnet/minecraft/class_1887;FI)Lnet/minecraft/class_120$class_121;
      named binomialWithBonusCount Lnet/minecraft/loot/function/ApplyBonusLootFunction;binomialWithBonusCount(Lnet/minecraft/enchantment/Enchantment;FI)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
    • oreDrops

      public static ConditionalLootFunction.Builder<?> oreDrops(Enchantment enchantment)
      Mappings:
      Namespace Name Mixin selector
      official a Ledq;a(Lcno;)Leec$a;
      intermediary method_455 Lnet/minecraft/class_94;method_455(Lnet/minecraft/class_1887;)Lnet/minecraft/class_120$class_121;
      named oreDrops Lnet/minecraft/loot/function/ApplyBonusLootFunction;oreDrops(Lnet/minecraft/enchantment/Enchantment;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
    • uniformBonusCount

      public static ConditionalLootFunction.Builder<?> uniformBonusCount(Enchantment enchantment)
      Mappings:
      Namespace Name Mixin selector
      official b Ledq;b(Lcno;)Leec$a;
      intermediary method_456 Lnet/minecraft/class_94;method_456(Lnet/minecraft/class_1887;)Lnet/minecraft/class_120$class_121;
      named uniformBonusCount Lnet/minecraft/loot/function/ApplyBonusLootFunction;uniformBonusCount(Lnet/minecraft/enchantment/Enchantment;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
    • uniformBonusCount

      public static ConditionalLootFunction.Builder<?> uniformBonusCount(Enchantment enchantment, int bonusMultiplier)
      Mappings:
      Namespace Name Mixin selector
      official a Ledq;a(Lcno;I)Leec$a;
      intermediary method_461 Lnet/minecraft/class_94;method_461(Lnet/minecraft/class_1887;I)Lnet/minecraft/class_120$class_121;
      named uniformBonusCount Lnet/minecraft/loot/function/ApplyBonusLootFunction;uniformBonusCount(Lnet/minecraft/enchantment/Enchantment;I)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;