Record Class ExplosionPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.ExplosionPacket
- All Implemented Interfaces:
NetworkBuffer.Writer
,SendablePacket
,ServerPacket
,ServerPacket.Play
public record ExplosionPacket(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ, @NotNull ExplosionPacket.BlockInteraction blockInteraction, int smallParticleId, byte @NotNull [] smallParticleData, int largeParticleId, byte @NotNull [] largeParticleData, @NotNull String soundName, boolean hasFixedSoundRange, float soundRange)
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
ConstructorDescriptionExplosionPacket
(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ) ExplosionPacket
(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ, @NotNull ExplosionPacket.BlockInteraction blockInteraction, int smallParticleId, byte @NotNull [] smallParticleData, int largeParticleId, byte @NotNull [] largeParticleData, @NotNull String soundName, boolean hasFixedSoundRange, float soundRange) Creates an instance of aExplosionPacket
record class.ExplosionPacket
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescription@NotNull ExplosionPacket.BlockInteraction
Returns the value of theblockInteraction
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of thehasFixedSoundRange
record component.final int
hashCode()
Returns a hash code value for this object.byte @NotNull []
Returns the value of thelargeParticleData
record component.int
Returns the value of thelargeParticleId
record component.float
Returns the value of theplayerMotionX
record component.float
Returns the value of theplayerMotionY
record component.float
Returns the value of theplayerMotionZ
record component.int
playId()
float
radius()
Returns the value of theradius
record component.byte @NotNull []
records()
Returns the value of therecords
record component.byte @NotNull []
Returns the value of thesmallParticleData
record component.int
Returns the value of thesmallParticleId
record component.@NotNull String
Returns the value of thesoundName
record component.float
Returns the value of thesoundRange
record component.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
-
ExplosionPacket
-
ExplosionPacket
public ExplosionPacket(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ) -
ExplosionPacket
public ExplosionPacket(double x, double y, double z, float radius, byte @NotNull [] records, float playerMotionX, float playerMotionY, float playerMotionZ, @NotNull @NotNull ExplosionPacket.BlockInteraction blockInteraction, int smallParticleId, byte @NotNull [] smallParticleData, int largeParticleId, byte @NotNull [] largeParticleData, @NotNull @NotNull String soundName, boolean hasFixedSoundRange, float soundRange) Creates an instance of aExplosionPacket
record class.- Parameters:
x
- the value for thex
record componenty
- the value for they
record componentz
- the value for thez
record componentradius
- the value for theradius
record componentrecords
- the value for therecords
record componentplayerMotionX
- the value for theplayerMotionX
record componentplayerMotionY
- the value for theplayerMotionY
record componentplayerMotionZ
- the value for theplayerMotionZ
record componentblockInteraction
- the value for theblockInteraction
record componentsmallParticleId
- the value for thesmallParticleId
record componentsmallParticleData
- the value for thesmallParticleData
record componentlargeParticleId
- the value for thelargeParticleId
record componentlargeParticleData
- the value for thelargeParticleData
record componentsoundName
- the value for thesoundName
record componenthasFixedSoundRange
- the value for thehasFixedSoundRange
record componentsoundRange
- the value for thesoundRange
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 '=='. -
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
-
radius
public float radius()Returns the value of theradius
record component.- Returns:
- the value of the
radius
record component
-
records
public byte @NotNull [] records()Returns the value of therecords
record component.- Returns:
- the value of the
records
record component
-
playerMotionX
public float playerMotionX()Returns the value of theplayerMotionX
record component.- Returns:
- the value of the
playerMotionX
record component
-
playerMotionY
public float playerMotionY()Returns the value of theplayerMotionY
record component.- Returns:
- the value of the
playerMotionY
record component
-
playerMotionZ
public float playerMotionZ()Returns the value of theplayerMotionZ
record component.- Returns:
- the value of the
playerMotionZ
record component
-
blockInteraction
Returns the value of theblockInteraction
record component.- Returns:
- the value of the
blockInteraction
record component
-
smallParticleId
public int smallParticleId()Returns the value of thesmallParticleId
record component.- Returns:
- the value of the
smallParticleId
record component
-
smallParticleData
public byte @NotNull [] smallParticleData()Returns the value of thesmallParticleData
record component.- Returns:
- the value of the
smallParticleData
record component
-
largeParticleId
public int largeParticleId()Returns the value of thelargeParticleId
record component.- Returns:
- the value of the
largeParticleId
record component
-
largeParticleData
public byte @NotNull [] largeParticleData()Returns the value of thelargeParticleData
record component.- Returns:
- the value of the
largeParticleData
record component
-
soundName
Returns the value of thesoundName
record component.- Returns:
- the value of the
soundName
record component
-
hasFixedSoundRange
public boolean hasFixedSoundRange()Returns the value of thehasFixedSoundRange
record component.- Returns:
- the value of the
hasFixedSoundRange
record component
-
soundRange
public float soundRange()Returns the value of thesoundRange
record component.- Returns:
- the value of the
soundRange
record component
-