Improve docs for create_explosion() (#1764)

* Update incorrect docs for `create_explosion()`

* Added descriptions of arguments, instead of just defaults
This commit is contained in:
Ghoulboy authored and GitHub committed 2023-08-03 13:45:06 +02:00
1 parent 4546b98cd3
commit 60e6dcd633
1 file changed
+8 -4
+8 -4
View File
@@ -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)`