Explode
Emits an explosion at a position.
Type ID: kaya:explode
Info
This type provides the following context parameters to certain fields:
| Parameter | Description |
|---|---|
kaya:exploded_block |
The block affected by the explosion. |
| Parameter | Description |
|---|---|
kaya:emitter_entity |
The entity that emitted the explosion, or none if the emitter field is not present. |
kaya:exploded_entity |
The entity affected by the explosion. |
| Parameter | Description |
|---|---|
kaya:emitter_entity |
The entity that emitted the explosion, or none if the emitter field is not present. |
kaya:exploded_entity |
The entity affected by the explosion. |
Format
| Field | Type | Default | Description |
|---|---|---|---|
damageable_condition |
Condition | optional | If specified, determines which entities can be damaged. |
destructible_condition |
Condition | optional | If specified, determines which blocks can be destroyed. |
sound |
Sound Event | "minecraft:entity.generic.explode" |
The sound to play for the explosion. |
small_particle |
Particle Effect | "minecraft:explosion" |
The particle to emit if the explosion is small. |
large_particle |
Particle Effect | "minecraft:explosion_emitter" |
The particle to emit if the explosion is large. |
block_interaction |
Block Interaction | Determines how the explosion will interact with the affected blocks. | |
power |
Float Provider | Determines the power/radius of the explosion. | |
knockback_multiplier |
Float Provider | 1.0 |
Determines the knockback multiplier received by the affected entities. |
create_fire |
Boolean Provider | true |
Determines whether fire should be placed within the affected area of the explosion. |
position |
Vec3 Provider | The position of the explosion. | |
emitter |
Entity Provider | optional | If specified, this entity will be considered the one that emitted the explosion. |
Explosion sizes
An explosion is considered small if its power is $\lt 2.0$ or if its block_interaction is not "keep".
Example
{
"type": "kaya:explode",
"damageable_condition": {
"type": "kaya:check_entity_type",
"key": "minecraft:creeper",
"entity": "exploded_entity"
},
"block_interaction": "keep",
"power": 16.0,
"position": {
"type": "kaya:block/position",
"block": "broken_block"
},
"emitter": "this"
}
This example will emit an explosion with a power/radius of $16.0$ which only damages creepers at the position of the block provided by the kaya:broken_block context parameter, with the entity provided by the kaya:this_entity context parameter being the entity that emitted the explosion.
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |