Merge branch 'master' into 1.17
# Conflicts: # src/main/java/carpet/mixins/ServerWorld_scarpetMixin.java # src/main/java/carpet/script/api/WorldAccess.java
This commit is contained in:
commit
388a3de577
15 files changed
+326
-19
No files matched your search
@@ -229,6 +229,13 @@ Causes a block to be harvested by a specified player entity. Honors player item
|
||||
tool if applicable. If the entity is not a valid player, no block gets destroyed. If a player is not allowed to break
|
||||
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`.
|
||||
|
||||
### `weather()`,`weather(type)`,`weather(type, ticks)`
|
||||
|
||||
If called with no args, returns `'clear'`, `'rain` or `'thunder'` based on the current weather. If thundering, will
|
||||
|
||||
@@ -79,6 +79,19 @@ 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, 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. 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,
|
||||
which will then be namespaced as `namespace:rule`.
|
||||
@@ -107,7 +120,7 @@ Example events that may cause it to happen is releasing a bow. The event is trig
|
||||
the request, however the `item_tuple` is provided representing the item that the player started with. You can use that and
|
||||
compare with the currently held item for a delta.
|
||||
|
||||
### `__on_player_finishes_using_item(player, item_tuple, hand))`
|
||||
### `__on_player_finishes_using_item(player, item_tuple, hand)`
|
||||
Player using of an item is done. This is controlled server side and is responsible for such events as finishing
|
||||
eating. The event is triggered after confirming that the action is valid, and sending the feedback back
|
||||
to the client, but before triggering it and its effects in game.
|
||||
|
||||
Reference in new issue
Block a user