Merge branch 'master' into 1.17

This commit is contained in:
gnembon committed 2021-03-14 03:17:06 -03:00
commit 98745a7341
15 files changed
+417 -107

No files matched your search

+8 -2
View File
@@ -4,7 +4,7 @@ Collection of other methods that control smaller, yet still important aspects of
## Sounds
### `sound(name, pos, volume?, pitch?, mixer?)`
### `sound()`, `sound(name, pos, volume?, pitch?, mixer?)`
Plays a specific sound `name`, at block or position `pos`, with optional `volume` and modified `pitch`, and under
optional `mixer`. Default values for `volume`, `pitch` and `mixer` are `1.0`, `1.0`, and `master`.
@@ -12,17 +12,23 @@ Valid mixer options are `master`, `music`, `record`, `weather`, `block`, `hostil
and `voice`. `pos` can be either a block, triple of coords, or a list of thee numbers. Uses the same options as a
corresponding `playsound` command.
Used with no arguments, return the list of available sound names.
Throws `unknown_sound` if sound doesn't exist.
## Particles
### `particle(name, pos, count?. spread?, speed?, player?)`
### `particle()`, `particle(name, pos, count?. spread?, speed?, player?)`
Renders a cloud of particles `name` centered around `pos` position, by default `count` 10 of them, default `speed`
of 0, and to all players nearby, but these options can be changed via optional arguments. Follow vanilla `/particle`
command on details on those options. Valid particle names are
for example `'angry_villager', 'item diamond', 'block stone', 'dust 0.8 0.1 0.1 4'`.
Used with no arguments, return the list of available particle names. Note that some of the names do not correspond to a valid
particle that can be fed to `particle(...)` function due to a fact that some particles need more configuration
to be valid, like `dust`, `block` etc. Should be used as a reference only.
Throws `unknown_particle` if particle doesn't exist.
### `particle_line(name, pos, pos2, density?, player?)`
+2 -2
View File
@@ -315,13 +315,13 @@ used to match specific information from it, or use it to copy to another block
<pre> block_data(x,y,z) => '{TransferCooldown:0,x:450,y:68, ... }'
</pre>
### `poi(pos), poi(pos, radius?, type?, status?, column?)`
### `poi(pos), poi(pos, radius?, type?, status?, column_search?)`
Queries a POI (Point of Interest) at a given position, returning `null` if none is found, or tuple of poi type and its
occupancy load. With optional `type`, `radius` and `status`, returns a list of POIs around `pos` within a
given `radius`. If the `type` is specified, returns only poi types of that types, or everything if omitted or `'any'`.
If `status` is specified (either `'any'`, `'available'`, or `'occupied'`) returns only POIs with that status.
With `column` set to `true`, it will return all POIs in a cuboid with `radius` blocks away on x and z, in the entire
With `column_search` set to `true`, it will return all POIs in a cuboid with `radius` blocks away on x and z, in the entire
block column from 0 to 255. Default (`false`) returns POIs within a spherical area centered on `pos` and with `radius`
radius.
+11 -3
View File
@@ -6,13 +6,12 @@ Displays or modifies individual scoreboard values. With no arguments, returns th
With specified `objective`, lists all keys (players) associated with current objective, or `null` if objective does not exist.
With specified `objective` and
`key`, returns current value of the objective for a given player (key). With additional `value` sets a new scoreboard
value, returning previous value associated with the `key`.
value, returning previous value associated with the `key`. If the `value` is null, resets the scoreboard value.
### `scoreboard_add(objective, criterion?)`
Adds a new objective to scoreboard. If `criterion` is not specified, assumes `'dummy'`.
If the objective already exists, changes the criterion of that objective and returns `false`. If the criterion was not specified but the objective already exists, returns the current criterion.
If the objective was added, returns `true`. If nothing is affected, returns `null`
Returns `true` if the objective was created, or `null` if an objective with the specified name already exists.
Throws `unknown_criterion` if criterion doesn't exist.
@@ -33,6 +32,15 @@ for the objective.
Sets display location for a specified `objective`. If `objective` is `null`, then display is cleared. If objective is invalid,
returns `null`.
### `scoreboard_property(objective, property)` `scoreboard_property(objective, property, value)`
Reads a property of an `objective` or sets it to a `value` if specified. Available properties are:
* `criterion`
* `display_name` (Formatted text supported)
* `display_slot`: When reading, returns a list of slots this objective is displayed in, when modifying, displays the objective in the specified slot
* `render_type`: Either `'integer'` or `'hearts'`, defaults to `'integer'` if invalid value specified
# Team
### `team_list()`, `team_list(team)`