Record Class ExplosionPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.ExplosionPacket
- All Implemented Interfaces:
SendablePacket
,ServerPacket
,ServerPacket.Play
public record ExplosionPacket(@NotNull Point center, @Nullable Point playerKnockback, @NotNull Particle particle, @NotNull SoundEvent sound)
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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExplosionPacket
(@NotNull Point center, @Nullable Point playerKnockback, @NotNull Particle particle, @NotNull SoundEvent sound) Creates an instance of aExplosionPacket
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Point
center()
Returns the value of thecenter
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.@NotNull Particle
particle()
Returns the value of theparticle
record component.@Nullable Point
Returns the value of theplayerKnockback
record component.@NotNull SoundEvent
sound()
Returns the value of thesound
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
ExplosionPacket
public ExplosionPacket(@NotNull @NotNull Point center, @Nullable @Nullable Point playerKnockback, @NotNull @NotNull Particle particle, @NotNull @NotNull SoundEvent sound) Creates an instance of aExplosionPacket
record class.- Parameters:
center
- the value for thecenter
record componentplayerKnockback
- the value for theplayerKnockback
record componentparticle
- the value for theparticle
record componentsound
- the value for thesound
record 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 withObjects::equals(Object,Object)
. -
center
Returns the value of thecenter
record component.- Returns:
- the value of the
center
record component
-
playerKnockback
Returns the value of theplayerKnockback
record component.- Returns:
- the value of the
playerKnockback
record component
-
particle
Returns the value of theparticle
record component.- Returns:
- the value of the
particle
record component
-
sound
Returns the value of thesound
record component.- Returns:
- the value of the
sound
record component
-