Package net.minecraft.loot.functions
Class SetDamage
- java.lang.Object
-
- net.minecraft.loot.LootFunction
-
- net.minecraft.loot.functions.SetDamage
-
- All Implemented Interfaces:
java.util.function.BiFunction<ItemStack,LootContext,ItemStack>,ILootFunction,IParameterized
public class SetDamage extends LootFunction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSetDamage.Serializer-
Nested classes/interfaces inherited from class net.minecraft.loot.LootFunction
LootFunction.Builder<T extends LootFunction.Builder<T>>
-
Nested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private RandomValueRangedamageprivate static org.apache.logging.log4j.LoggerLOGGER-
Fields inherited from class net.minecraft.loot.LootFunction
predicates
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSetDamage(ILootCondition[] p_i46622_1_, RandomValueRange p_i46622_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LootFunctionTypegetType()ItemStackrun(ItemStack p_215859_1_, LootContext p_215859_2_)static LootFunction.Builder<?>setDamage(RandomValueRange p_215931_0_)-
Methods inherited from class net.minecraft.loot.LootFunction
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 net.minecraft.loot.IParameterized
getReferencedContextParams
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
damage
private final RandomValueRange damage
-
-
Constructor Detail
-
SetDamage
private SetDamage(ILootCondition[] p_i46622_1_, RandomValueRange p_i46622_2_)
-
-
Method Detail
-
getType
public LootFunctionType getType()
-
run
public ItemStack run(ItemStack p_215859_1_, LootContext p_215859_2_)
- Specified by:
runin classLootFunction
-
setDamage
public static LootFunction.Builder<?> setDamage(RandomValueRange p_215931_0_)
-
-