Record Class ExplosionPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.ExplosionPacket
- All Implemented Interfaces:
NetworkBuffer.Writer,SendablePacket,ServerPacket
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
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExplosionPacket(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 aExplosionPacketrecord class.ExplosionPacket(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescription@NotNull ExplosionPacket.BlockInteractionReturns the value of theblockInteractionrecord component.final booleanIndicates whether some other object is "equal to" this one.intgetId(@NotNull ConnectionState state) Gets the id of this packet.booleanReturns the value of thehasFixedSoundRangerecord component.final inthashCode()Returns a hash code value for this object.byte @NotNull []Returns the value of thelargeParticleDatarecord component.intReturns the value of thelargeParticleIdrecord component.floatReturns the value of theplayerMotionXrecord component.floatReturns the value of theplayerMotionYrecord component.floatReturns the value of theplayerMotionZrecord component.floatradius()Returns the value of theradiusrecord component.byte @NotNull []records()Returns the value of therecordsrecord component.byte @NotNull []Returns the value of thesmallParticleDatarecord component.intReturns the value of thesmallParticleIdrecord component.@NotNull StringReturns the value of thesoundNamerecord component.floatReturns the value of thesoundRangerecord component.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.
-
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 aExplosionPacketrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentradius- the value for theradiusrecord componentrecords- the value for therecordsrecord componentplayerMotionX- the value for theplayerMotionXrecord componentplayerMotionY- the value for theplayerMotionYrecord componentplayerMotionZ- the value for theplayerMotionZrecord componentblockInteraction- the value for theblockInteractionrecord componentsmallParticleId- the value for thesmallParticleIdrecord componentsmallParticleData- the value for thesmallParticleDatarecord componentlargeParticleId- the value for thelargeParticleIdrecord componentlargeParticleData- the value for thelargeParticleDatarecord componentsoundName- the value for thesoundNamerecord componenthasFixedSoundRange- the value for thehasFixedSoundRangerecord componentsoundRange- the value for thesoundRangerecord component
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
getId
Description copied from interface:ServerPacketGets the id of this packet.Written in the final buffer header so it needs to match the client id.
- Specified by:
getIdin interfaceServerPacket- Returns:
- the id of this packet
-
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 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
-
radius
public float radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-
records
public byte @NotNull [] records()Returns the value of therecordsrecord component.- Returns:
- the value of the
recordsrecord component
-
playerMotionX
public float playerMotionX()Returns the value of theplayerMotionXrecord component.- Returns:
- the value of the
playerMotionXrecord component
-
playerMotionY
public float playerMotionY()Returns the value of theplayerMotionYrecord component.- Returns:
- the value of the
playerMotionYrecord component
-
playerMotionZ
public float playerMotionZ()Returns the value of theplayerMotionZrecord component.- Returns:
- the value of the
playerMotionZrecord component
-
blockInteraction
Returns the value of theblockInteractionrecord component.- Returns:
- the value of the
blockInteractionrecord component
-
smallParticleId
public int smallParticleId()Returns the value of thesmallParticleIdrecord component.- Returns:
- the value of the
smallParticleIdrecord component
-
smallParticleData
public byte @NotNull [] smallParticleData()Returns the value of thesmallParticleDatarecord component.- Returns:
- the value of the
smallParticleDatarecord component
-
largeParticleId
public int largeParticleId()Returns the value of thelargeParticleIdrecord component.- Returns:
- the value of the
largeParticleIdrecord component
-
largeParticleData
public byte @NotNull [] largeParticleData()Returns the value of thelargeParticleDatarecord component.- Returns:
- the value of the
largeParticleDatarecord component
-
soundName
Returns the value of thesoundNamerecord component.- Returns:
- the value of the
soundNamerecord component
-
hasFixedSoundRange
public boolean hasFixedSoundRange()Returns the value of thehasFixedSoundRangerecord component.- Returns:
- the value of the
hasFixedSoundRangerecord component
-
soundRange
public float soundRange()Returns the value of thesoundRangerecord component.- Returns:
- the value of the
soundRangerecord component
-