Package net.minecraft.loot.function
Class SetEnchantmentsLootFunction
java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
net.minecraft.loot.function.SetEnchantmentsLootFunction
- All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>,LootContextAware,LootFunction
public class SetEnchantmentsLootFunction extends ConditionalLootFunction
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSetEnchantmentsLootFunction.SerializerNested classes/interfaces inherited from class net.minecraft.loot.function.ConditionalLootFunction
ConditionalLootFunction.Builder<T extends ConditionalLootFunction.Builder<T>>, ConditionalLootFunction.Joiner -
Field Summary
Fields Modifier and Type Field Description private booleanaddprivate Map<Enchantment,LootNumberProvider>enchantmentsFields inherited from class net.minecraft.loot.function.ConditionalLootFunction
conditions -
Constructor Summary
Constructors Modifier Constructor Description privateSetEnchantmentsLootFunction(LootCondition[] conditions, Map<Enchantment,LootNumberProvider> enchantments, boolean add) -
Method Summary
Modifier and Type Method Description Set<LootContextParameter<?>>getRequiredParameters()LootFunctionTypegetType()private static voidmethod_32411(Map<Enchantment,Integer> map, Enchantment enchantment, int int2)ItemStackprocess(ItemStack stack, LootContext context)Methods inherited from class net.minecraft.loot.function.ConditionalLootFunction
apply, builder, 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
andThen
-
Field Details
-
enchantments
-
add
private final boolean add
-
-
Constructor Details
-
SetEnchantmentsLootFunction
private SetEnchantmentsLootFunction(LootCondition[] conditions, Map<Enchantment,LootNumberProvider> enchantments, boolean add)
-
-
Method Details
-
getType
-
getRequiredParameters
-
process
- Specified by:
processin classConditionalLootFunction
-
method_32411
-