Record Class ParticlePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.ParticlePacket
- All Implemented Interfaces:
NetworkBuffer.Writer
,SendablePacket
,ServerPacket
,ServerPacket.Play
public record ParticlePacket(int particleId, boolean longDistance, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int particleCount, @Nullable ParticleData data)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status
-
Constructor Summary
ConstructorDescriptionParticlePacket
(int particleId, boolean longDistance, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int particleCount, @Nullable ParticleData data) Creates an instance of aParticlePacket
record class.ParticlePacket
(@NotNull NetworkBuffer reader) ParticlePacket
(@NotNull Particle particle, boolean longDistance, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int particleCount) ParticlePacket
(@NotNull Particle particle, boolean longDistance, @NotNull Point position, @NotNull Point offset, float maxSpeed, int particleCount) ParticlePacket
(@NotNull Particle particle, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int particleCount) ParticlePacket
(@NotNull Particle particle, @NotNull Point position, @NotNull Point offset, float maxSpeed, int particleCount) -
Method Summary
Modifier and TypeMethodDescription@Nullable ParticleData
data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of thelongDistance
record component.float
maxSpeed()
Returns the value of themaxSpeed
record component.float
offsetX()
Returns the value of theoffsetX
record component.float
offsetY()
Returns the value of theoffsetY
record component.float
offsetZ()
Returns the value of theoffsetZ
record component.int
Returns the value of theparticleCount
record component.int
Returns the value of theparticleId
record component.int
playId()
final String
toString()
Returns a string representation of this record class.void
write
(@NotNull NetworkBuffer writer) double
x()
Returns the value of thex
record component.double
y()
Returns the value of they
record component.double
z()
Returns the value of thez
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.network.packet.server.ServerPacket
getId
-
Constructor Details
-
ParticlePacket
-
ParticlePacket
public ParticlePacket(@NotNull @NotNull Particle particle, boolean longDistance, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int particleCount) -
ParticlePacket
public ParticlePacket(@NotNull @NotNull Particle particle, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int particleCount) -
ParticlePacket
-
ParticlePacket
-
ParticlePacket
public ParticlePacket(int particleId, boolean longDistance, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int particleCount, @Nullable @Nullable ParticleData data) Creates an instance of aParticlePacket
record class.- Parameters:
particleId
- the value for theparticleId
record componentlongDistance
- the value for thelongDistance
record componentx
- the value for thex
record componenty
- the value for they
record componentz
- the value for thez
record componentoffsetX
- the value for theoffsetX
record componentoffsetY
- the value for theoffsetY
record componentoffsetZ
- the value for theoffsetZ
record componentmaxSpeed
- the value for themaxSpeed
record componentparticleCount
- the value for theparticleCount
record componentdata
- the value for thedata
record component
-
-
Method Details
-
write
- Specified by:
write
in interfaceNetworkBuffer.Writer
-
playId
public int playId()- Specified by:
playId
in interfaceServerPacket.Play
-
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 '=='. -
particleId
public int particleId()Returns the value of theparticleId
record component.- Returns:
- the value of the
particleId
record component
-
longDistance
public boolean longDistance()Returns the value of thelongDistance
record component.- Returns:
- the value of the
longDistance
record component
-
x
public double x()Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
y
public double y()Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
z
public double z()Returns the value of thez
record component.- Returns:
- the value of the
z
record component
-
offsetX
public float offsetX()Returns the value of theoffsetX
record component.- Returns:
- the value of the
offsetX
record component
-
offsetY
public float offsetY()Returns the value of theoffsetY
record component.- Returns:
- the value of the
offsetY
record component
-
offsetZ
public float offsetZ()Returns the value of theoffsetZ
record component.- Returns:
- the value of the
offsetZ
record component
-
maxSpeed
public float maxSpeed()Returns the value of themaxSpeed
record component.- Returns:
- the value of the
maxSpeed
record component
-
particleCount
public int particleCount()Returns the value of theparticleCount
record component.- Returns:
- the value of the
particleCount
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-