Record Class FireworkExplosion
java.lang.Object
java.lang.Record
net.minestom.server.item.component.FireworkExplosion
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec
<FireworkExplosion> static final NetworkBuffer.Type
<FireworkExplosion> -
Constructor Summary
ConstructorsConstructorDescriptionFireworkExplosion
(@NotNull FireworkExplosion.Shape shape, @NotNull List<RGBLike> colors, @NotNull List<RGBLike> fadeColors, boolean hasTrail, boolean hasTwinkle) Creates an instance of aFireworkExplosion
record class. -
Method Summary
Modifier and TypeMethodDescriptioncolors()
Returns the value of thecolors
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefadeColors
record component.final int
hashCode()
Returns a hash code value for this object.boolean
hasTrail()
Returns the value of thehasTrail
record component.boolean
Returns the value of thehasTwinkle
record component.@NotNull FireworkExplosion.Shape
shape()
Returns the value of theshape
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
FireworkExplosion
public FireworkExplosion(@NotNull @NotNull FireworkExplosion.Shape shape, @NotNull @NotNull List<RGBLike> colors, @NotNull @NotNull List<RGBLike> fadeColors, boolean hasTrail, boolean hasTwinkle) Creates an instance of aFireworkExplosion
record class.- Parameters:
shape
- the value for theshape
record componentcolors
- the value for thecolors
record componentfadeColors
- the value for thefadeColors
record componenthasTrail
- the value for thehasTrail
record componenthasTwinkle
- the value for thehasTwinkle
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
shape
Returns the value of theshape
record component.- Returns:
- the value of the
shape
record component
-
colors
-
fadeColors
-
hasTrail
public boolean hasTrail()Returns the value of thehasTrail
record component.- Returns:
- the value of the
hasTrail
record component
-
hasTwinkle
public boolean hasTwinkle()Returns the value of thehasTwinkle
record component.- Returns:
- the value of the
hasTwinkle
record component
-