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
ConstructorsConstructorDescriptionParticlePacket(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 aParticlePacketrecord 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, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int particleCount) -
Method Summary
Modifier and TypeMethodDescription@Nullable ParticleDatadata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thelongDistancerecord component.floatmaxSpeed()Returns the value of themaxSpeedrecord component.floatoffsetX()Returns the value of theoffsetXrecord component.floatoffsetY()Returns the value of theoffsetYrecord component.floatoffsetZ()Returns the value of theoffsetZrecord component.intReturns the value of theparticleCountrecord component.intReturns the value of theparticleIdrecord component.intplayId()final StringtoString()Returns a string representation of this record class.voidwrite(@NotNull NetworkBuffer writer) doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.doublez()Returns the value of thezrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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
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 aParticlePacketrecord class.- Parameters:
particleId- the value for theparticleIdrecord componentlongDistance- the value for thelongDistancerecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentoffsetX- the value for theoffsetXrecord componentoffsetY- the value for theoffsetYrecord componentoffsetZ- the value for theoffsetZrecord componentmaxSpeed- the value for themaxSpeedrecord componentparticleCount- the value for theparticleCountrecord componentdata- the value for thedatarecord component
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
playId
public int playId()- Specified by:
playIdin 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 theparticleIdrecord component.- Returns:
- the value of the
particleIdrecord component
-
longDistance
public boolean longDistance()Returns the value of thelongDistancerecord component.- Returns:
- the value of the
longDistancerecord component
-
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
offsetX
public float offsetX()Returns the value of theoffsetXrecord component.- Returns:
- the value of the
offsetXrecord component
-
offsetY
public float offsetY()Returns the value of theoffsetYrecord component.- Returns:
- the value of the
offsetYrecord component
-
offsetZ
public float offsetZ()Returns the value of theoffsetZrecord component.- Returns:
- the value of the
offsetZrecord component
-
maxSpeed
public float maxSpeed()Returns the value of themaxSpeedrecord component.- Returns:
- the value of the
maxSpeedrecord component
-
particleCount
public int particleCount()Returns the value of theparticleCountrecord component.- Returns:
- the value of the
particleCountrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-