Merge branch 'master' into 1.16

This commit is contained in:
gnembon committed 2020-06-18 20:11:50 -03:00
commit 98b95a74f4
4 files changed
+166 -72

No files matched your search

+1 -1
View File
@@ -200,7 +200,7 @@ With the specified `resource` in the scripts folder, of a specific `type`, write
content, or deletes the resource.
Resource is identified by a path to the file.
A path can contain letters, numbers and folder separator: `'/'`. Any other characters are stripped
A path can contain letters, numbers, characters `-`, `+`, or `_`, and a folder separator: `'/'`. Any other characters are stripped
from the name. Empty descriptors are invalid. Do not add file extensions to the descriptor - extensions are inferred
based on the `type` of the file.
+6 -2
View File
@@ -36,11 +36,14 @@ print(b); // 'stone', block was evaluated 'eagerly' but call to `block`
All the functions below can be used with block value, queried with coord triple, or 3-long list. All `pos` in the
functions referenced below refer to either method of passing block position.
### `set(pos, block, property?, value?, ...)`
### `set(pos, block, property?, value?, ..., block_data?)`, `set(pos, block, l(property?, value?, ...), block_data?)`
First part of the `set` function is either a coord triple, list of three numbers, or other block with coordinates.
Second part, `block` is either block value as a result of `block()` function string value indicating the block name,
and optional `property - value` pairs for extra block properties. If `block` is specified only by name, then if a
and optional `property - value` pairs for extra block properties. Optional `block_data` include the block data to
be set for the target block.
If `block` is specified only by name, then if a
destination block is the same the `set` operation is skipped, otherwise is executed, for other potential extra
properties.
@@ -64,6 +67,7 @@ set(x,y,z,'iron_trapdoor[half=top]') // Incorrect. sets bottom iron trapdoor -
set(x,y,z,'iron_trapdoor','half','top') // correct - top trapdoor
set(x,y,z, block('iron_trapdoor[half=top]')) // also correct, block() provides extra parsing
set(x,y,z,'hopper[facing=north]{Items:[{Slot:1b,id:"minecraft:slime_ball",Count:16b}]}') // extra block data
set(x,y,z,'hopper', l('facing', 'north'), nbt('{Items:[{Slot:1b,id:"minecraft:slime_ball",Count:16b}]}') ) // same
</pre>
### `without_updates(expr)`