Package net.minecraft.loot.function
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 official dfm
intermediary net/minecraft/class_109
named net/minecraft/loot/function/EnchantRandomlyLootFunction
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnchantRandomlyLootFunction.Builder
static class
EnchantRandomlyLootFunction.Serializer
Nested classes/interfaces inherited from class net.minecraft.loot.function.ConditionalLootFunction
ConditionalLootFunction.Joiner
-
Field Summary
Fields Modifier and Type Field Description private List<Enchantment>
enchantments
private static Logger
LOGGER
Fields inherited from class net.minecraft.loot.function.ConditionalLootFunction
conditions
-
Constructor Summary
Constructors Modifier Constructor Description private
EnchantRandomlyLootFunction(LootCondition[] conditions, Collection<Enchantment> enchantments)
-
Method Summary
Modifier and Type Method Description private static ItemStack
addEnchantmentToStack(ItemStack stack, Enchantment enchantment, Random random)
static ConditionalLootFunction.Builder<?>
builder()
LootFunctionType
getType()
ItemStack
process(ItemStack stack, LootContext context)
Methods inherited from class net.minecraft.loot.function.ConditionalLootFunction
apply, builder, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
Methods inherited from interface net.minecraft.loot.context.LootContextAware
getRequiredParameters
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Ldfm;a:Lorg/apache/logging/log4j/Logger;
intermediary field_1031
Lnet/minecraft/class_109;field_1031:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;LOGGER:Lorg/apache/logging/log4j/Logger;
-
enchantments
- Mappings:
Namespace Name Mixin selector official b
Ldfm;b:Ljava/util/List;
intermediary field_1030
Lnet/minecraft/class_109;field_1030:Ljava/util/List;
named enchantments
Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;enchantments:Ljava/util/List;
-
-
Constructor Details
-
EnchantRandomlyLootFunction
private EnchantRandomlyLootFunction(LootCondition[] conditions, Collection<Enchantment> enchantments)- Mappings:
Namespace Name Mixin selector official <init>
Ldfm;<init>([Ldha;Ljava/util/Collection;)V
intermediary <init>
Lnet/minecraft/class_109;<init>([Lnet/minecraft/class_5341;Ljava/util/Collection;)V
named <init>
Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;<init>([Lnet/minecraft/loot/condition/LootCondition;Ljava/util/Collection;)V
-
-
Method Details
-
getType
- Mappings:
Namespace Name Mixin selector official a
Ldft;a()Ldfu;
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;
-
process
- Specified by:
process
in classConditionalLootFunction
- Mappings:
Namespace Name Mixin selector official a
Ldfs;a(Lbnv;Ldei;)Lbnv;
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;
-
addEnchantmentToStack
private static ItemStack addEnchantmentToStack(ItemStack stack, Enchantment enchantment, Random random)- Mappings:
Namespace Name Mixin selector official a
Ldfm;a(Lbnv;Lbrp;Ljava/util/Random;)Lbnv;
intermediary method_26266
Lnet/minecraft/class_109;method_26266(Lnet/minecraft/class_1799;Lnet/minecraft/class_1887;Ljava/util/Random;)Lnet/minecraft/class_1799;
named addEnchantmentToStack
Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;addEnchantmentToStack(Lnet/minecraft/item/ItemStack;Lnet/minecraft/enchantment/Enchantment;Ljava/util/Random;)Lnet/minecraft/item/ItemStack;
-
builder
- Mappings:
Namespace Name Mixin selector official d
Ldfm;d()Ldfs$a;
intermediary method_489
Lnet/minecraft/class_109;method_489()Lnet/minecraft/class_120$class_121;
named builder
Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;builder()Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
-