added create_explosion and more event handlers.
This commit is contained in:
1 parent
7b00952653
commit
e063748e83
12 files changed
+226
-31
No files matched your search
@@ -79,10 +79,18 @@ at the same time.
|
||||
Triggered right after a lightning strikes. Lightning entity as well as potential horseman trap would
|
||||
already be spawned at that point. `mode` is `true` if the lightning did cause a trap to spawn.
|
||||
|
||||
### `__on_explosion(pos, power, source, create_fire, blocks, entities)`
|
||||
Triggered right before an explosion blows up and any changes to the blocks are done, but the decision to blow up is already made and entities are already affected.
|
||||
### `__on_explosion(pos, power, source, causer, mode, fire)`
|
||||
|
||||
Event triggered right before explosion takes place and before has any effect on the world. `source` can be an entity causing
|
||||
the explosion, and `causer` the entity triggering it,
|
||||
`mode` indicates block effects: `'none'`, `'break'` (drop all blocks), or `'destroy'` - drop few blocks. Event
|
||||
is not captured when `create_explosion()` is called.
|
||||
|
||||
### `__on_explosion_outcome(pos, power, source, causer, mode, fire, blocks, entities)`
|
||||
Triggered during the explosion, before any changes to the blocks are done,
|
||||
but the decision to blow up is already made and entities are already affected.
|
||||
The parameter `blocks` contains the list of blocks that will blow up (empty if `explosionNoBlockDamage` is set to `true`).
|
||||
The parameter `entities` contains the list of entities that have been affected by the explosion.
|
||||
The parameter `entities` contains the list of entities that have been affected by the explosion. Triggered even with `create_explosion()`.
|
||||
|
||||
### `__on_carpet_rule_changes(rule, new_value)`
|
||||
Triggered when a carpet mod rule is changed. It includes extension rules, not using default `/carpet` command,
|
||||
|
||||
Reference in new issue
Block a user