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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<Enchantment>private static final org.apache.logging.log4j.LoggerFields inherited from class net.minecraft.loot.LootFunction
predicates -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateEnchantRandomly(ILootCondition[] p_i51238_1_, Collection<Enchantment> p_i51238_2_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static ItemStackenchantItem(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, 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.IParameterized
getReferencedContextParams
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
enchantments
-
-
Constructor Details
-
EnchantRandomly
-
-
Method Details
-
getType
-
run
- Specified by:
runin classLootFunction
-
enchantItem
private static ItemStack enchantItem(ItemStack p_237420_0_, Enchantment p_237420_1_, Random p_237420_2_) -
randomApplicableEnchantment
-