Merge branch 'master' into 1.16
This commit is contained in:
commit
fb29177d5d
4 files changed
+10
-7
No files matched your search
@@ -1109,7 +1109,7 @@ for(range(1000000,1100000),check_prime(_)) => 7216
|
|||||||
|
|
||||||
From which we can learn that there is 7216 primes between 1M and 1.1M
|
From which we can learn that there is 7216 primes between 1M and 1.1M
|
||||||
|
|
||||||
### `while(cond, limit)`
|
### `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.
|
||||||
Returns the result of the last `expr` evaluation, or `null` if nothing was successful. Both `expr` and `cond` will
|
Returns the result of the last `expr` evaluation, or `null` if nothing was successful. Both `expr` and `cond` will
|
||||||
|
|||||||
@@ -155,12 +155,12 @@ query(e,'custom_name') => null
|
|||||||
query(e,'type') => villager
|
query(e,'type') => villager
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
## `query(e, 'command_name')`
|
### `query(e, 'command_name')`
|
||||||
|
|
||||||
Returns a valid string to be used in commands to address an entity. Its UUID for all entities except
|
Returns a valid string to be used in commands to address an entity. Its UUID for all entities except
|
||||||
player, where its their name.
|
player, where its their name.
|
||||||
|
|
||||||
## `query(e, 'persistence')`
|
### `query(e, 'persistence')`
|
||||||
|
|
||||||
Returns if a mob has a persistence tag or not. Returns `null` for non-mob entities.
|
Returns if a mob has a persistence tag or not. Returns `null` for non-mob entities.
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ for(range(1000000,1100000),check_prime(_)) => 7216
|
|||||||
|
|
||||||
From which we can learn that there is 7216 primes between 1M and 1.1M
|
From which we can learn that there is 7216 primes between 1M and 1.1M
|
||||||
|
|
||||||
### `while(cond, limit)`
|
### `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.
|
||||||
Returns the result of the last `expr` evaluation, or `null` if nothing was successful. Both `expr` and `cond` will
|
Returns the result of the last `expr` evaluation, or `null` if nothing was successful. Both `expr` and `cond` will
|
||||||
@@ -145,4 +145,4 @@ it will be used from now on as a new value for the accumulator.
|
|||||||
<pre>
|
<pre>
|
||||||
reduce([1,2,3,4],_a+_,0) => 10
|
reduce([1,2,3,4],_a+_,0) => 10
|
||||||
reduce([1,2,3,4],_a*_,1) => 24
|
reduce([1,2,3,4],_a*_,1) => 24
|
||||||
</pre>
|
</pre>
|
||||||
@@ -61,9 +61,12 @@ public final class ParsedRule<T> implements Comparable<ParsedRule> {
|
|||||||
{
|
{
|
||||||
this.options = ImmutableList.copyOf(rule.options());
|
this.options = ImmutableList.copyOf(rule.options());
|
||||||
}
|
}
|
||||||
else if (this.type == boolean.class || (this.type == String.class && categories.contains(RuleCategory.COMMAND)))
|
else if (this.type == boolean.class){
|
||||||
|
this.options = ImmutableList.of("true","false");
|
||||||
|
}
|
||||||
|
else if(this.type == String.class && categories.contains(RuleCategory.COMMAND))
|
||||||
{
|
{
|
||||||
this.options = ImmutableList.of("true", "false");
|
this.options = ImmutableList.of("true", "false", "ops");
|
||||||
}
|
}
|
||||||
else if (this.type.isEnum())
|
else if (this.type.isEnum())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user