The bug
entity_scores
conditions cannot express all possible ranges of ints because they use RandomValueBounds
that its min
and max
are floats.
Actual score | Predicate | Condition passes? | Should this happen? |
---|---|---|---|
16777216 | 16777216 | yes | ✔ |
16777216 | 16777217 | yes | ❌ |
16777217 | 16777216 | yes | ❌ |
16777217 | 16777217 | yes | ✔ |
How to reproduce
/scoreboard objectives add _ dummy
/scoreboard players set @s _ 16777216
/execute if predicate _
→ ✔
Test passed
/scoreboard players set @s _ 16777217
/execute if predicate _
→ ❌
Test passed
data/minecraft/predicates/_.json
{ "condition": "minecraft:entity_scores", "scores": { "_": 16777216 }, "entity": "this" }
Linked issues
relates to 2
Attachments
Comments 6
I don't think it uses the int range, the entity_scores condition after this fix can even pass the score 16777216 in both conditions ✔ 16777216 and ❌ 16777217. (tested in 20w46a and 1.19.1-pre5)
Thanks for the info, @unknown! Upon some testing,
In 20w45a
Actual score | Predicate | Condition passes? | Should this happen? |
---|---|---|---|
16777216 | 16777216 | yes | ✔ |
16777216 | 16777217 | yes | ❌ |
16777217 | 16777216 | yes | ❌ |
16777217 | 16777217 | yes | ✔ |
In 20w46a
Actual score | Predicate | Condition passes? | Should this happen? |
---|---|---|---|
16777216 | 16777216 | yes | ✔ |
16777216 | 16777217 | yes | ❌ |
16777217 | 16777216 | no | ✔ |
16777217 | 16777217 | no | ❌ |
The behavior has changed between the two versions, so I have created a new ticket MC-254370 to track the new behaviors.
Attached a datapack which tests this automatically after loaded.