Package net.minecraft.loot.functions
Class EnchantRandomly
java.lang.Object
net.minecraft.loot.LootFunction
net.minecraft.loot.functions.EnchantRandomly
- All Implemented Interfaces:
BiFunction<ItemStack,
,LootContext, ItemStack> ILootFunction
,IParameterized
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<Enchantment>
private static final org.apache.logging.log4j.Logger
Fields inherited from class net.minecraft.loot.LootFunction
predicates
-
Constructor Summary
ModifierConstructorDescriptionprivate
EnchantRandomly
(ILootCondition[] p_i51238_1_, Collection<Enchantment> p_i51238_2_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static ItemStack
enchantItem
(ItemStack p_237420_0_, Enchantment p_237420_1_, Random p_237420_2_) getType()
static LootFunction.Builder<?>
run
(ItemStack p_215859_1_, LootContext p_215859_2_) Methods inherited from class net.minecraft.loot.LootFunction
apply, simpleBuilder, 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.IParameterized
getReferencedContextParams
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
enchantments
-
-
Constructor Details
-
EnchantRandomly
-
-
Method Details
-
getType
-
run
- Specified by:
run
in classLootFunction
-
enchantItem
private static ItemStack enchantItem(ItemStack p_237420_0_, Enchantment p_237420_1_, Random p_237420_2_) -
randomApplicableEnchantment
-