Class SetFireworksFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetFireworksFunction
- 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
FieldsModifier and TypeFieldDescriptionstatic final Fireworksprivate final Optional<ListOperation.StandAlone<FireworkExplosion>> static final com.mojang.serialization.MapCodec<SetFireworksFunction> Fields inherited from class LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsConstructorDescriptionSetFireworksFunction(List<LootItemCondition> predicates, Optional<ListOperation.StandAlone<FireworkExplosion>> explosions, Optional<Integer> flightDuration) -
Method Summary
Modifier and TypeMethodDescriptionprivate Fireworkscom.mojang.serialization.MapCodec<SetFireworksFunction> codec()protected ItemStackrun(ItemStack itemStack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.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
-
DEFAULT_VALUE
-
explosions
-
flightDuration
-
-
Constructor Details
-
SetFireworksFunction
public SetFireworksFunction(List<LootItemCondition> predicates, Optional<ListOperation.StandAlone<FireworkExplosion>> explosions, Optional<Integer> flightDuration)
-
-
Method Details
-
run
Description copied from class:LootItemConditionalFunctionCalled to perform the actual action of this function, after conditions have been checked.- Specified by:
runin classLootItemConditionalFunction
-
apply
-
codec
- Specified by:
codecin interfaceLootItemFunction- Specified by:
codecin classLootItemConditionalFunction
-