Class SetItemDamageFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction
- 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.Builder<T extends LootItemConditionalFunction.Builder<T>>, LootItemConditionalFunction.DummyBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
static final com.mojang.serialization.Codec<SetItemDamageFunction>
private final NumberProvider
private static final org.slf4j.Logger
Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates
-
Constructor Summary
ModifierConstructorDescriptionprivate
SetItemDamageFunction
(List<LootItemCondition> p_300823_, NumberProvider p_165428_, boolean p_165429_) -
Method Summary
Modifier and TypeMethodDescriptionSet<LootContextParam<?>>
getType()
run
(ItemStack p_81048_, LootContext p_81049_) static LootItemConditionalFunction.Builder<?>
setDamage
(NumberProvider p_165431_) static LootItemConditionalFunction.Builder<?>
setDamage
(NumberProvider p_165433_, boolean p_165434_) 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
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CODEC
-
damage
-
add
private final boolean add
-
-
Constructor Details
-
SetItemDamageFunction
private SetItemDamageFunction(List<LootItemCondition> p_300823_, NumberProvider p_165428_, boolean p_165429_)
-
-
Method Details
-
getType
-
getReferencedContextParams
-
run
- Specified by:
run
in classLootItemConditionalFunction
-
setDamage
-
setDamage
public static LootItemConditionalFunction.Builder<?> setDamage(NumberProvider p_165433_, boolean p_165434_)
-