Class EnchantedCountIncreaseFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.EnchantedCountIncreaseFunction
- All Implemented Interfaces:
BiFunction<ItemStack,
,LootContext, ItemStack> LootItemFunction
,LootContextUser
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
LootItemConditionalFunction.DummyBuilder
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<EnchantedCountIncreaseFunction> private final Holder
<Enchantment> private final int
static final int
private final NumberProvider
Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates
-
Constructor Summary
ConstructorDescriptionEnchantedCountIncreaseFunction
(List<LootItemCondition> p_344991_, Holder<Enchantment> p_343841_, NumberProvider p_343472_, int p_342112_) -
Method Summary
Modifier and TypeMethodDescriptionSet
<LootContextParam<?>> getType()
private boolean
hasLimit()
lootingMultiplier
(HolderLookup.Provider p_345331_, NumberProvider p_344068_) run
(ItemStack p_344964_, LootContext p_345394_) Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
apply, commonFields, 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
-
Field Details
-
NO_LIMIT
public static final int NO_LIMIT- See Also:
-
CODEC
-
enchantment
-
value
-
limit
private final int limit
-
-
Constructor Details
-
EnchantedCountIncreaseFunction
EnchantedCountIncreaseFunction(List<LootItemCondition> p_344991_, Holder<Enchantment> p_343841_, NumberProvider p_343472_, int p_342112_)
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceLootItemFunction
- Specified by:
getType
in classLootItemConditionalFunction
-
getReferencedContextParams
-
hasLimit
private boolean hasLimit() -
run
- Specified by:
run
in classLootItemConditionalFunction
-
lootingMultiplier
public static EnchantedCountIncreaseFunction.Builder lootingMultiplier(HolderLookup.Provider p_345331_, NumberProvider p_344068_)
-