Package net.minecraft.loot.function
Class EnchantWithLevelsLootFunction
java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
net.minecraft.loot.function.EnchantWithLevelsLootFunction
- All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>
,LootContextAware
,LootFunction
public class EnchantWithLevelsLootFunction extends ConditionalLootFunction
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnchantWithLevelsLootFunction.Builder
static class
EnchantWithLevelsLootFunction.Serializer
Nested classes/interfaces inherited from class net.minecraft.loot.function.ConditionalLootFunction
ConditionalLootFunction.Joiner
-
Field Summary
Fields Modifier and Type Field Description private LootNumberProvider
range
private boolean
treasureEnchantmentsAllowed
Fields inherited from class net.minecraft.loot.function.ConditionalLootFunction
conditions
-
Constructor Summary
Constructors Modifier Constructor Description private
EnchantWithLevelsLootFunction(LootCondition[] conditions, LootNumberProvider range, boolean treasureEnchantmentsAllowed)
-
Method Summary
Modifier and Type Method Description static EnchantWithLevelsLootFunction.Builder
builder(LootNumberProvider range)
Set<LootContextParameter<?>>
getRequiredParameters()
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
-
Field Details
-
range
-
treasureEnchantmentsAllowed
private final boolean treasureEnchantmentsAllowed
-
-
Constructor Details
-
EnchantWithLevelsLootFunction
private EnchantWithLevelsLootFunction(LootCondition[] conditions, LootNumberProvider range, boolean treasureEnchantmentsAllowed)
-
-
Method Details
-
getType
-
getRequiredParameters
-
process
- Specified by:
process
in classConditionalLootFunction
-
builder
-