Explode (Bi-Entity Action Type)
Creates an explosion at the actor or at the target, with control over how it treats blocks. Damage and kill credit go to the actor.
Type ID: apoli:explode
Fields
| Field | Type | Default | Description |
|---|---|---|---|
power | Float | required | The power of the explosion, which sets its blast radius. |
destruction_type | String | "destroy" | How the explosion affects blocks: "none", "break" or "destroy". |
create_fire | Boolean | false | Whether the explosion starts fires in the blast area. |
at_target | Boolean | false | With true, the explosion starts at the target's position, and otherwise at the actor's. |
damage_self | Boolean | true | Whether the actor takes damage from its own explosion. |
damage_targets | Boolean | true | Whether everything other than the actor takes damage. false keeps the broken blocks and the knockback but deals no damage. |
bientity_condition | Bi-entity Condition Type | optional | Only entities that pass this take damage, with the actor as the actor and the entity in the blast as the target. |
indestructible | Block Condition Type | optional | Blocks that pass this are protected from the explosion, whatever the destruction_type. |
destructible | Block Condition Type | optional | Blocks that pass this can be destroyed, even if they also pass indestructible. Once it is set, blocks that don't pass it are protected. |
Block destruction logic
Each block in the blast is checked in this order:
- If
destructibleis set and the block passes it, the block can be destroyed, whateverindestructiblesays. - If
indestructibleis set and the block passes it, the block is protected. - If
destructibleis set and the block didn't pass it, the block is protected. - Otherwise,
destruction_typedecides as it does for a normal explosion.
Examples
{
"type": "apoli:explode",
"power": 3.0,
"destruction_type": "break",
"create_fire": false
}An explosion at the actor's position that breaks blocks.