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
named net/minecraft/loot/function/ApplyBonusLootFunction
intermediary net/minecraft/class_94
official exl
  • Field Details

    • FACTORIES

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

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

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

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

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

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

    • ApplyBonusLootFunction

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

    • getType

      Specified by:
      getType in interface LootFunction
      Specified by:
      getType in class ConditionalLootFunction
      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;
    • getAllowedParameters

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

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

      public static ConditionalLootFunction.Builder<?> binomialWithBonusCount(RegistryEntry<Enchantment> enchantment, float probability, int extra)
      Mappings:
      Namespace Name Mixin selector
      named binomialWithBonusCount Lnet/minecraft/loot/function/ApplyBonusLootFunction;binomialWithBonusCount(Lnet/minecraft/registry/entry/RegistryEntry;FI)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
      intermediary method_463 Lnet/minecraft/class_94;method_463(Lnet/minecraft/class_6880;FI)Lnet/minecraft/class_120$class_121;
      official a Lexl;a(Ljq;FI)Leyb$a;
    • oreDrops

      public static ConditionalLootFunction.Builder<?> oreDrops(RegistryEntry<Enchantment> enchantment)
      Mappings:
      Namespace Name Mixin selector
      named oreDrops Lnet/minecraft/loot/function/ApplyBonusLootFunction;oreDrops(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
      intermediary method_455 Lnet/minecraft/class_94;method_455(Lnet/minecraft/class_6880;)Lnet/minecraft/class_120$class_121;
      official a Lexl;a(Ljq;)Leyb$a;
    • uniformBonusCount

      public static ConditionalLootFunction.Builder<?> uniformBonusCount(RegistryEntry<Enchantment> enchantment)
      Mappings:
      Namespace Name Mixin selector
      named uniformBonusCount Lnet/minecraft/loot/function/ApplyBonusLootFunction;uniformBonusCount(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
      intermediary method_456 Lnet/minecraft/class_94;method_456(Lnet/minecraft/class_6880;)Lnet/minecraft/class_120$class_121;
      official b Lexl;b(Ljq;)Leyb$a;
    • uniformBonusCount

      public static ConditionalLootFunction.Builder<?> uniformBonusCount(RegistryEntry<Enchantment> enchantment, int bonusMultiplier)
      Mappings:
      Namespace Name Mixin selector
      named uniformBonusCount Lnet/minecraft/loot/function/ApplyBonusLootFunction;uniformBonusCount(Lnet/minecraft/registry/entry/RegistryEntry;I)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
      intermediary method_461 Lnet/minecraft/class_94;method_461(Lnet/minecraft/class_6880;I)Lnet/minecraft/class_120$class_121;
      official a Lexl;a(Ljq;I)Leyb$a;