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(FireworkExplosion.Shape shape, List<RGBLike> colors, List<RGBLike> fadeColors, boolean hasTrail, boolean hasTwinkle) Creates an instance of aFireworkExplosionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolors()Returns the value of thecolorsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefadeColorsrecord component.final inthashCode()Returns a hash code value for this object.booleanhasTrail()Returns the value of thehasTrailrecord component.booleanReturns the value of thehasTwinklerecord component.shape()Returns the value of theshaperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
FireworkExplosion
public FireworkExplosion(FireworkExplosion.Shape shape, List<RGBLike> colors, List<RGBLike> fadeColors, boolean hasTrail, boolean hasTwinkle) Creates an instance of aFireworkExplosionrecord class.- Parameters:
shape- the value for theshaperecord componentcolors- the value for thecolorsrecord componentfadeColors- the value for thefadeColorsrecord componenthasTrail- the value for thehasTrailrecord componenthasTwinkle- the value for thehasTwinklerecord 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 thecomparemethod from their corresponding wrapper classes. -
shape
Returns the value of theshaperecord component.- Returns:
- the value of the
shaperecord component
-
colors
-
fadeColors
-
hasTrail
public boolean hasTrail()Returns the value of thehasTrailrecord component.- Returns:
- the value of the
hasTrailrecord component
-
hasTwinkle
public boolean hasTwinkle()Returns the value of thehasTwinklerecord component.- Returns:
- the value of the
hasTwinklerecord component
-