Loss of precision in entity_scores conditions
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" }
2020-02-01, 06:25 PM
2022-07-19, 10:57 PM
2022-07-19, 10:49 PM
9
6