Class SetFireworkExplosionFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetFireworkExplosionFunction
- 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 TypeFieldDescriptionprivate final Optional<it.unimi.dsi.fastutil.ints.IntList> static final FireworkExplosionprivate final Optional<it.unimi.dsi.fastutil.ints.IntList> static final com.mojang.serialization.MapCodec<SetFireworkExplosionFunction> private final Optional<FireworkExplosion.Shape> Fields inherited from class LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsConstructorDescriptionSetFireworkExplosionFunction(List<LootItemCondition> predicates, Optional<FireworkExplosion.Shape> shape, Optional<it.unimi.dsi.fastutil.ints.IntList> colors, Optional<it.unimi.dsi.fastutil.ints.IntList> fadeColors, Optional<Boolean> hasTrail, Optional<Boolean> hasTwinkle) -
Method Summary
Modifier and TypeMethodDescriptionprivate FireworkExplosionapply(FireworkExplosion original) com.mojang.serialization.MapCodec<SetFireworkExplosionFunction> codec()protected ItemStackrun(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
-
DEFAULT_VALUE
-
shape
-
colors
-
fadeColors
-
trail
-
twinkle
-
-
Constructor Details
-
SetFireworkExplosionFunction
public SetFireworkExplosionFunction(List<LootItemCondition> predicates, Optional<FireworkExplosion.Shape> shape, Optional<it.unimi.dsi.fastutil.ints.IntList> colors, Optional<it.unimi.dsi.fastutil.ints.IntList> fadeColors, Optional<Boolean> hasTrail, Optional<Boolean> hasTwinkle)
-
-
Method Details
-
run
- Specified by:
runin classLootItemConditionalFunction
-
apply
-
codec
- Specified by:
codecin interfaceLootItemFunction- Specified by:
codecin classLootItemConditionalFunction
-