Record Class TrailParticleData
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.level.particle.TrailParticleData
- All Implemented Interfaces:
ParticleData
public record TrailParticleData(double targetX, double targetY, double targetZ, int color, int duration)
extends Record
implements ParticleData
-
Constructor Summary
ConstructorsConstructorDescriptionTrailParticleData(double targetX, double targetY, double targetZ, int color, int duration) Creates an instance of aTrailParticleDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Returns the value of thecolorrecord component.intduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubletargetX()Returns the value of thetargetXrecord component.doubletargetY()Returns the value of thetargetYrecord component.doubletargetZ()Returns the value of thetargetZrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TrailParticleData
public TrailParticleData(double targetX, double targetY, double targetZ, int color, int duration) Creates an instance of aTrailParticleDatarecord class.- Parameters:
targetX- the value for thetargetXrecord componenttargetY- the value for thetargetYrecord componenttargetZ- the value for thetargetZrecord componentcolor- the value for thecolorrecord componentduration- the value for thedurationrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
targetX
public double targetX()Returns the value of thetargetXrecord component.- Returns:
- the value of the
targetXrecord component
-
targetY
public double targetY()Returns the value of thetargetYrecord component.- Returns:
- the value of the
targetYrecord component
-
targetZ
public double targetZ()Returns the value of thetargetZrecord component.- Returns:
- the value of the
targetZrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-