Record Class FireworkExplosion
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.FireworkExplosion
- All Implemented Interfaces:
Copyable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Type<FireworkExplosion[]>static final String[]static final Type<FireworkExplosion> -
Constructor Summary
ConstructorsConstructorDescriptionFireworkExplosion(int shape, int[] colors, int[] fadeColors, boolean hasTrail, boolean hasTwinkle) Creates an instance of aFireworkExplosionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionint[]colors()Returns the value of thecolorsrecord component.copy()final booleanIndicates whether some other object is "equal to" this one.int[]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.intshape()Returns the value of theshaperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SHAPES
-
TYPE
-
ARRAY_TYPE
-
-
Constructor Details
-
FireworkExplosion
public FireworkExplosion(int shape, int[] colors, int[] 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
-
copy
-
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 theshaperecord component.- Returns:
- the value of the
shaperecord component
-
colors
public int[] colors()Returns the value of thecolorsrecord component.- Returns:
- the value of the
colorsrecord component
-
fadeColors
public int[] fadeColors()Returns the value of thefadeColorsrecord component.- Returns:
- the value of the
fadeColorsrecord component
-
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
-