Skip to content

Commit

Permalink
Improve docs for create_explosion() (#1764)
Browse files Browse the repository at this point in the history
* Update incorrect docs for `create_explosion()`

* Added descriptions of arguments, instead of just defaults
  • Loading branch information
Ghoulboy78 authored Aug 3, 2023
1 parent 4546b98 commit 60e6dcd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/scarpet/api/BlocksAndWorldAccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`

Expand Down

0 comments on commit 60e6dcd

Please sign in to comment.