Record Class ExplosionS2CPacket
java.lang.Object
java.lang.Record
net.minecraft.network.packet.s2c.play.ExplosionS2CPacket
- Record Components:
center-radius-blockCount-playerKnockback-explosionParticle-explosionSound-blockParticles-
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public record ExplosionS2CPacket(Vec3d center, float radius, int blockCount, Optional<Vec3d> playerKnockback, ParticleEffect explosionParticle, RegistryEntry<SoundEvent> explosionSound, Pool<BlockParticleEffect> blockParticles)
extends Record
implements Packet<ClientPlayPacketListener>
Sent when an explosion occurs in the world.
The client will update the player's velocity as well as performing an explosion.
- See Also:
- Mappings:
Namespace Name named net/minecraft/network/packet/s2c/play/ExplosionS2CPacketintermediary net/minecraft/class_2664official aeanamed centerintermediary comp_2883official bnamed radiusintermediary comp_4594official cnamed blockCountintermediary comp_4595official dnamed playerKnockbackintermediary comp_2884official enamed explosionParticleintermediary comp_2885official fnamed explosionSoundintermediary comp_2886official gnamed blockParticlesintermediary comp_4596official h
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theblockCountrecord component.private final Pool<BlockParticleEffect> The field for theblockParticlesrecord component.private final Vec3dThe field for thecenterrecord component.static final PacketCodec<RegistryByteBuf, ExplosionS2CPacket> private final ParticleEffectThe field for theexplosionParticlerecord component.private final RegistryEntry<SoundEvent> The field for theexplosionSoundrecord component.The field for theplayerKnockbackrecord component.private final floatThe field for theradiusrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionExplosionS2CPacket(Vec3d vec3d, float float2, int int2, Optional<Vec3d> optional, ParticleEffect particleEffect, RegistryEntry<SoundEvent> registryEntry, Pool<BlockParticleEffect> pool) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ClientPlayPacketListener clientPlayPacketListener) intReturns 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.Returns the value of theexplosionParticlerecord component.Returns the value of theexplosionSoundrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theplayerKnockbackrecord component.floatradius()Returns the value of theradiusrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable, transitionsNetworkState
-
Field Details
-
center
The field for thecenterrecord component. -
radius
private final float radiusThe field for theradiusrecord component. -
blockCount
private final int blockCountThe field for theblockCountrecord component. -
playerKnockback
The field for theplayerKnockbackrecord component. -
explosionParticle
The field for theexplosionParticlerecord component. -
explosionSound
The field for theexplosionSoundrecord component. -
blockParticles
The field for theblockParticlesrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/packet/s2c/play/ExplosionS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_47925Lnet/minecraft/class_2664;field_47925:Lnet/minecraft/class_9139;official aLaea;a:Laae;
-
-
Constructor Details
-
ExplosionS2CPacket
public ExplosionS2CPacket(Vec3d vec3d, float float2, int int2, Optional<Vec3d> optional, ParticleEffect particleEffect, RegistryEntry<SoundEvent> registryEntry, Pool<BlockParticleEffect> pool)
-
-
Method Details
-
getPacketType
- Specified by:
getPacketTypein interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector named getPacketTypeLnet/minecraft/network/packet/Packet;getPacketType()Lnet/minecraft/network/packet/PacketType;intermediary method_65080Lnet/minecraft/class_2596;method_65080()Lnet/minecraft/class_9145;official aLaao;a()Laaq;
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/network/packet/s2c/play/ExplosionS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)Vintermediary method_11480Lnet/minecraft/class_2664;method_11480(Lnet/minecraft/class_2602;)Vofficial aLaea;a(Lacr;)V
-
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 '=='. -
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
Returns the value of theplayerKnockbackrecord component.- Returns:
- the value of the
playerKnockbackrecord component
-
explosionParticle
Returns the value of theexplosionParticlerecord component.- Returns:
- the value of the
explosionParticlerecord component
-
explosionSound
Returns the value of theexplosionSoundrecord component.- Returns:
- the value of the
explosionSoundrecord component
-
blockParticles
Returns the value of theblockParticlesrecord component.- Returns:
- the value of the
blockParticlesrecord component
-