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
- Mappings:
Namespace Name official edmintermediary net/minecraft/class_109named net/minecraft/loot/function/EnchantRandomlyLootFunction
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<RegistryEntryList<Enchantment>>static final com.mojang.serialization.Codec<EnchantRandomlyLootFunction>private static final com.mojang.serialization.Codec<RegistryEntryList<Enchantment>>private static final LoggerFields inherited from class net.minecraft.loot.function.ConditionalLootFunction
conditions -
Constructor Summary
ConstructorsConstructorDescriptionEnchantRandomlyLootFunction(List<LootCondition> list, Optional<RegistryEntryList<Enchantment>> optional) -
Method Summary
Modifier and TypeMethodDescriptionprivate static ItemStackaddEnchantmentToStack(ItemStack stack, Enchantment enchantment, Random random) static ConditionalLootFunction.Builder<?>builder()create()getType()process(ItemStack stack, LootContext context) Methods inherited from class net.minecraft.loot.function.ConditionalLootFunction
apply, builder, method_53344, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThenMethods inherited from interface net.minecraft.loot.context.LootContextAware
getRequiredParameters
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official bLedm;b:Lorg/slf4j/Logger;intermediary field_1031Lnet/minecraft/class_109;field_1031:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/loot/function/EnchantRandomlyLootFunction;LOGGER:Lorg/slf4j/Logger;
-
field_45824
- Mappings:
Namespace Name Mixin selector official cLedm;c:Lcom/mojang/serialization/Codec;intermediary field_45824Lnet/minecraft/class_109;field_45824:Lcom/mojang/serialization/Codec;named field_45824Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;field_45824:Lcom/mojang/serialization/Codec;
-
field_45823
- Mappings:
Namespace Name Mixin selector official aLedm;a:Lcom/mojang/serialization/Codec;intermediary field_45823Lnet/minecraft/class_109;field_45823:Lcom/mojang/serialization/Codec;named field_45823Lnet/minecraft/loot/function/EnchantRandomlyLootFunction;field_45823:Lcom/mojang/serialization/Codec;
-
enchantments
- Mappings:
Namespace Name Mixin selector official dLedm;d:Ljava/util/Optional;intermediary field_1030Lnet/minecraft/class_109;field_1030:Ljava/util/Optional;named enchantmentsLnet/minecraft/loot/function/EnchantRandomlyLootFunction;enchantments:Ljava/util/Optional;
-
-
Constructor Details
-
EnchantRandomlyLootFunction
EnchantRandomlyLootFunction(List<LootCondition> list, Optional<RegistryEntryList<Enchantment>> optional)
-
-
Method Details
-
getType
- Mappings:
Namespace Name Mixin selector official bLedu;b()Ledv;intermediary method_29321Lnet/minecraft/class_117;method_29321()Lnet/minecraft/class_5339;named getTypeLnet/minecraft/loot/function/LootFunction;getType()Lnet/minecraft/loot/function/LootFunctionType;
-
process
- Specified by:
processin classConditionalLootFunction- Mappings:
Namespace Name Mixin selector official aLedt;a(Lciy;Lech;)Lciy;intermediary method_522Lnet/minecraft/class_120;method_522(Lnet/minecraft/class_1799;Lnet/minecraft/class_47;)Lnet/minecraft/class_1799;named processLnet/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 aLedm;a(Lciy;Lcnf;Laru;)Lciy;intermediary method_26266Lnet/minecraft/class_109;method_26266(Lnet/minecraft/class_1799;Lnet/minecraft/class_1887;Lnet/minecraft/class_5819;)Lnet/minecraft/class_1799;named addEnchantmentToStackLnet/minecraft/loot/function/EnchantRandomlyLootFunction;addEnchantmentToStack(Lnet/minecraft/item/ItemStack;Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/item/ItemStack;
-
create
- Mappings:
Namespace Name Mixin selector official cLedm;c()Ledm$a;intermediary method_35520Lnet/minecraft/class_109;method_35520()Lnet/minecraft/class_109$class_4954;named createLnet/minecraft/loot/function/EnchantRandomlyLootFunction;create()Lnet/minecraft/loot/function/EnchantRandomlyLootFunction$Builder;
-
builder
- Mappings:
Namespace Name Mixin selector official dLedm;d()Ledt$a;intermediary method_489Lnet/minecraft/class_109;method_489()Lnet/minecraft/class_120$class_121;named builderLnet/minecraft/loot/function/EnchantRandomlyLootFunction;builder()Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
-