Package net.minecraft.loot.functions
Class SetContents
- java.lang.Object
-
- net.minecraft.loot.LootFunction
-
- net.minecraft.loot.functions.SetContents
-
- All Implemented Interfaces:
java.util.function.BiFunction<ItemStack,LootContext,ItemStack>
,ILootFunction
,IParameterized
public class SetContents extends LootFunction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetContents.Builder
static class
SetContents.Serializer
-
Nested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<LootEntry>
entries
-
Fields inherited from class net.minecraft.loot.LootFunction
predicates
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SetContents(ILootCondition[] p_i51226_1_, java.util.List<LootEntry> p_i51226_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LootFunctionType
getType()
ItemStack
run(ItemStack p_215859_1_, LootContext p_215859_2_)
static SetContents.Builder
setContents()
void
validate(ValidationTracker p_225580_1_)
-
Methods inherited from class net.minecraft.loot.LootFunction
apply, simpleBuilder
-
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
-
entries
private final java.util.List<LootEntry> entries
-
-
Constructor Detail
-
SetContents
private SetContents(ILootCondition[] p_i51226_1_, java.util.List<LootEntry> p_i51226_2_)
-
-
Method Detail
-
getType
public LootFunctionType getType()
-
run
public ItemStack run(ItemStack p_215859_1_, LootContext p_215859_2_)
- Specified by:
run
in classLootFunction
-
validate
public void validate(ValidationTracker p_225580_1_)
- Specified by:
validate
in interfaceIParameterized
- Overrides:
validate
in classLootFunction
-
setContents
public static SetContents.Builder setContents()
-
-