From 60e6dcd633c15720b7badc4698812cd3917e2040 Mon Sep 17 00:00:00 2001 From: Ghoulboy Date: Thu, 3 Aug 2023 13:45:06 +0200 Subject: [PATCH] Improve docs for `create_explosion()` (#1764) * Update incorrect docs for `create_explosion()` * Added descriptions of arguments, instead of just defaults --- docs/scarpet/api/BlocksAndWorldAccess.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/scarpet/api/BlocksAndWorldAccess.md b/docs/scarpet/api/BlocksAndWorldAccess.md index 70c266a92f..d3f3c10a81 100644 --- a/docs/scarpet/api/BlocksAndWorldAccess.md +++ b/docs/scarpet/api/BlocksAndWorldAccess.md @@ -230,10 +230,14 @@ that block, a block doesn't get destroyed either. ### `create_explosion(pos, power?, mode?, fire?, source?, attacker?)` -Creates an explosion at a given position. Default values of optional parameters are: `'power'` - `4` (TNT power), -`'mode'` (block breaking effect `none`, `destroy` or `break`: `break`, `fire` (whether extra fire blocks should be created) - `false`, -`source` (exploding entity) - `null` and `attacker` (entity responsible for trigerring) - `null`. Explosions created with this -endpoint cannot be captured with `__on_explosion` event, however they will be captured by `__on_explosion_outcome`. +Creates an explosion at a given position. Parameters work as follows: + - `'power'` - how strong the blast is, negative values count as 0 (default: `4` (TNT power)) + - `'mode'` - how to deal with broken blocks: `keep` keeps them, `destroy` destroys them and drops items, and `destroy_with_decay` destroys them, but doesn't always drop the items (default: `destroy_with_decay`) + - `fire` - whether extra fire blocks should be created (default: `false`) + - `source` - entity that is exploding. Note that it will not take explosion damage from this explosion (default: `null`) + - `attacker` - entity responsible for triggering, this will be displayed in death messages, and count towards kill counts, and can be damaged by the explosion (default: `null`) +Explosions created with this endpoint cannot be captured with `__on_explosion` event, however they will be captured +by `__on_explosion_outcome`. ### `weather()`,`weather(type)`,`weather(type, ticks)`