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(Point center, float radius, int blockCount, @Nullable Point playerKnockback, Particle particle, SoundEvent sound, WeightedList<ExplosionPacket.BlockParticleInfo> blockParticles)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExplosionPacket(Point center, float radius, int blockCount, @Nullable Point playerKnockback, Particle particle, SoundEvent sound, WeightedList<ExplosionPacket.BlockParticleInfo> blockParticles) Creates an instance of aExplosionPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theblockCountrecord component.Returns the value of theblockParticlesrecord component.center()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.particle()Returns the value of theparticlerecord component.Returns the value of theplayerKnockbackrecord component.floatradius()Returns the value of theradiusrecord component.sound()Returns the value of thesoundrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
ExplosionPacket
public ExplosionPacket(Point center, float radius, int blockCount, @Nullable @Nullable Point playerKnockback, Particle particle, SoundEvent sound, WeightedList<ExplosionPacket.BlockParticleInfo> blockParticles) Creates an instance of aExplosionPacketrecord class.- Parameters:
center- the value for thecenterrecord componentradius- the value for theradiusrecord componentblockCount- the value for theblockCountrecord componentplayerKnockback- the value for theplayerKnockbackrecord componentparticle- the value for theparticlerecord componentsound- the value for thesoundrecord componentblockParticles- the value for theblockParticlesrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
center
Returns the value of thecenterrecord component.- Returns:
- the value of the
centerrecord component
-
radius
public float radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-
blockCount
public int blockCount()Returns the value of theblockCountrecord component.- Returns:
- the value of the
blockCountrecord component
-
playerKnockback
-
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
-
blockParticles
Returns the value of theblockParticlesrecord component.- Returns:
- the value of the
blockParticlesrecord component
-