Merge docs for 'Carpet Mod 1.4.105 for Minecraft 23w16a'
This commit is contained in:
1 parent
ebd6db42c8
commit
66d906b8ae
1 file changed
+6
-3
@@ -1253,13 +1253,14 @@ for(range(1000000,1100000),check_prime(_)) => 7216
|
||||
|
||||
From which we can learn that there is 7216 primes between 1M and 1.1M
|
||||
|
||||
### `while(cond, limit, expr)`
|
||||
### `while(cond, expr)`, `while(cond, limit, expr)`
|
||||
|
||||
Evaluates expression `expr` repeatedly until condition `cond` becomes false, but not more than `limit` times.
|
||||
Evaluates expression `expr` repeatedly until condition `cond` becomes false, but not more than `limit` times (if limit is specified).
|
||||
Returns the result of the last `expr` evaluation, or `null` if nothing was successful. Both `expr` and `cond` will
|
||||
received a bound variable `_` indicating current iteration, so its a number.
|
||||
|
||||
<pre>
|
||||
while(a<100,a=_*_) => 100 // loop stopped at condition
|
||||
while(a<100,10,a=_*_) => 81 // loop exhausted via limit
|
||||
while(a<100,20,a=_*_) => 100 // loop stopped at condition, but a has already been assigned
|
||||
while(_*_<100,20,a=_*_) => 81 // loop stopped at condition, before a was assigned a value
|
||||
@@ -2816,7 +2817,8 @@ Returns the name of sound type made by the block at position. One of:
|
||||
|
||||
### `(Deprecated) material(pos)`
|
||||
|
||||
Returns the name of material of the block at position. Very limited as the use of material for blocks is removed.
|
||||
Returns `'unknown'`. The concept of material for blocks is removed. On previous versions it returned the name of the material the block
|
||||
was made of.
|
||||
|
||||
### `map_colour(pos)`
|
||||
|
||||
@@ -5534,6 +5536,7 @@ produce an exception.
|
||||
### `print(expr)`, `print(player/player_list, expr)`
|
||||
|
||||
Displays the result of the expression to the chat. Overrides default `scarpet` behaviour of sending everything to stderr.
|
||||
For player scoped apps it always by default targets the player for whom the app runs on behalf.
|
||||
Can optionally define player or list of players to send the message to.
|
||||
|
||||
### `format(components, ...)`, `format([components, ...])`
|
||||
|
||||
Reference in new issue
Block a user