Class EnchantRandomlyLootFunction

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

public class EnchantRandomlyLootFunction extends ConditionalLootFunction
Mappings:
Namespace Name
named net/minecraft/loot/function/EnchantRandomlyLootFunction
intermediary net/minecraft/class_109
official erm
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;LOGGER:Lorg/slf4j/Logger;
      intermediary field_1031 Lnet/minecraft/class_109;field_1031:Lorg/slf4j/Logger;
      official b Lerm;b:Lorg/slf4j/Logger;
    • ENCHANTMENT_LIST_CODEC

      private static final com.mojang.serialization.Codec<RegistryEntryList<Enchantment>> ENCHANTMENT_LIST_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENCHANTMENT_LIST_CODEC Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;ENCHANTMENT_LIST_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_45824 Lnet/minecraft/class_109;field_45824:Lcom/mojang/serialization/Codec;
      official c Lerm;c:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.MapCodec<EnchantRandomlyLootFunction> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_45823 Lnet/minecraft/class_109;field_45823:Lcom/mojang/serialization/MapCodec;
      official a Lerm;a:Lcom/mojang/serialization/MapCodec;
    • enchantments

      private final Optional<RegistryEntryList<Enchantment>> enchantments
      Mappings:
      Namespace Name Mixin selector
      named enchantments Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;enchantments:Ljava/util/Optional;
      intermediary field_1030 Lnet/minecraft/class_109;field_1030:Ljava/util/Optional;
      official d Lerm;d:Ljava/util/Optional;
  • Constructor Details

    • EnchantRandomlyLootFunction

      EnchantRandomlyLootFunction(List<LootCondition> conditions, Optional<RegistryEntryList<Enchantment>> enchantments)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;<init>(Ljava/util/List;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_109;<init>(Ljava/util/List;Ljava/util/Optional;)V
      official <init> Lerm;<init>(Ljava/util/List;Ljava/util/Optional;)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 Lerw;b()Lerx;
    • 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 Lerv;a(Lcuq;Leqj;)Lcuq;
    • addEnchantmentToStack

      private static ItemStack addEnchantmentToStack(ItemStack stack, Enchantment enchantment, Random random)
      Mappings:
      Namespace Name Mixin selector
      named addEnchantmentToStack Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;addEnchantmentToStack(Lnet/minecraft/item/ItemStack;Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/item/ItemStack;
      intermediary method_26266 Lnet/minecraft/class_109;method_26266(Lnet/minecraft/class_1799;Lnet/minecraft/class_1887;Lnet/minecraft/class_5819;)Lnet/minecraft/class_1799;
      official a Lerm;a(Lcuq;Ldab;Lazh;)Lcuq;
    • create

      public static EnchantRandomlyLootFunction.Builder create()
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;create()Lnet/minecraft/loot/function/EnchantRandomlyLootFunction$Builder;
      intermediary method_35520 Lnet/minecraft/class_109;method_35520()Lnet/minecraft/class_109$class_4954;
      official c Lerm;c()Lerm$a;
    • builder

      public static ConditionalLootFunction.Builder<?> builder()
      Mappings:
      Namespace Name Mixin selector
      named builder Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;builder()Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
      intermediary method_489 Lnet/minecraft/class_109;method_489()Lnet/minecraft/class_120$class_121;
      official d Lerm;d()Lerv$a;