Integer overflow when too far from spawn
codetaylor opened this issue ยท 1 comments
Issue Description
Integer overflow in distance matcher when too far from spawn.
Discord discussion: https://discord.com/channels/516841320594276353/516847563085840395/940488566264459355
What Happens
- Set up a rule to change dirt drops with debug.
- Travel 1000000 blocks from spawn using
/tp @p 1000000 ~ ~
. - Break dirt nearby.
- Notice this in log:
[DEBUG] [MATCH] [!!] Distance [NaN] inside range [0,2147483647]
[DEBUG] [!!] Rule not matched
Script
{
"rules": [
{
"debug": true,
"match": {
"blocks": {"blocks": ["minecraft:dirt"]}
},
"drops": [
{"item": {"items": ["minecraft:diamond"]}}
]
}
]
}