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 TypeFieldDescription(package private) boolean
(package private) NumberProvider
private static org.apache.logging.log4j.Logger
Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates
-
Constructor Summary
ConstructorDescriptionSetItemDamageFunction(LootItemCondition[] p_165427_, 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, 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.apache.logging.log4j.Logger LOGGER -
damage
-
add
final boolean add
-
-
Constructor Details
-
SetItemDamageFunction
SetItemDamageFunction(LootItemCondition[] p_165427_, 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_)
-