Skip to content

Explosion

Packet IDDirectionMojang NameMCP Name
0x3CClientboundExplodePacketPacket60Explosion

Used to tell the client about where an explosion occurred and what blocks were destroyed due to it. This spawns the explosion particles and plays the sound as well.

Clientbound

FieldTypeDescription
XDoubleThe X position of the explosion
YDoubleThe Y position of the explosion
ZDoubleThe Z position of the explosion
Explosion RadiusFloatThe radius of the explosion
Number of Destroyed BlocksIntegerThe number of destroyed blocks
Destroyed BlocksByte ArrayThe offsets of each destroyed block

The Destroyed Blocks Array has a format of (X,Y,Z) as bytes. These are added onto the explosions origin position, which is converted to an Integer.

cpp
int destroyedBlockX = int(explosionX) + offsetX;
int destroyedBlockY = int(explosionY) + offsetY;
int destroyedBlockZ = int(explosionZ) + offsetZ;

Example Packet

FieldValue
X51.0
Y66.4
Z-1642.4
Explosion Radius3.0f
Number of Destroyed Blocks2
Destroyed Blocks(4, 5, 6), (1, 2, 3)