Record Class FireworkExplosion
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.FireworkExplosion
public record FireworkExplosion(int shape, int[] colors, int[] fadeColors, boolean hasTrail, boolean hasTwinkle)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Type<FireworkExplosion[]>
static final Type<FireworkExplosion>
-
Constructor Summary
ConstructorDescriptionFireworkExplosion
(int shape, int[] colors, int[] fadeColors, boolean hasTrail, boolean hasTwinkle) Creates an instance of aFireworkExplosion
record class. -
Method Summary
Modifier and TypeMethodDescriptionint[]
colors()
Returns the value of thecolors
record component.final boolean
Indicates whether some other object is "equal to" this one.int[]
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.int
shape()
Returns the value of theshape
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
TYPE
-
ARRAY_TYPE
-
-
Constructor Details
-
FireworkExplosion
public FireworkExplosion(int shape, int[] colors, int[] 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
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
shape
public int shape()Returns the value of theshape
record component.- Returns:
- the value of the
shape
record component
-
colors
public int[] colors()Returns the value of thecolors
record component.- Returns:
- the value of the
colors
record component
-
fadeColors
public int[] fadeColors()Returns the value of thefadeColors
record component.- Returns:
- the value of the
fadeColors
record component
-
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
-