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 aExplosionPacketrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Pointcenter()Returns the value of thecenterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Particleparticle()Returns the value of theparticlerecord component.@Nullable PointReturns the value of theplayerKnockbackrecord component.@NotNull SoundEventsound()Returns the value of thesoundrecord component.final StringtoString()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 aExplosionPacketrecord class.- Parameters:
center- the value for thecenterrecord componentplayerKnockback- the value for theplayerKnockbackrecord componentparticle- the value for theparticlerecord componentsound- the value for thesoundrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
center
Returns the value of thecenterrecord component.- Returns:
- the value of the
centerrecord component
-
playerKnockback
Returns the value of theplayerKnockbackrecord component.- Returns:
- the value of the
playerKnockbackrecord component
-
particle
Returns the value of theparticlerecord component.- Returns:
- the value of the
particlerecord component
-
sound
Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord component
-