Class SetRandomPotionFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetRandomPotionFunction
- All Implemented Interfaces:
BiFunction<ItemStack, LootContext, ItemStack>, LootItemFunction, LootContextUser, Validatable
-
Nested Class Summary
Nested classes/interfaces inherited from class LootItemConditionalFunction
LootItemConditionalFunction.Builder<T> -
Field Summary
FieldsFields inherited from class LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSetRandomPotionFunction(List<LootItemCondition> predicates, Optional<HolderSet<Potion>> options) -
Method Summary
Modifier and TypeMethodDescriptioncodec()static LootItemConditionalFunction.Builder<?> fromTagKey(Optional<HolderSet<Potion>> tagKey) run(ItemStack itemStack, LootContext context) Methods inherited from class LootItemConditionalFunction
apply, commonFields, simpleBuilder, validateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThenMethods inherited from interface LootContextUser
getReferencedContextParams
-
Field Details
-
MAP_CODEC
-
options
-
-
Constructor Details
-
SetRandomPotionFunction
private SetRandomPotionFunction(List<LootItemCondition> predicates, Optional<HolderSet<Potion>> options)
-
-
Method Details
-
codec
- Specified by:
codecin interfaceLootItemFunction- Specified by:
codecin classLootItemConditionalFunction
-
run
- Specified by:
runin classLootItemConditionalFunction
-
fromTagKey
-