Scanners don't scan below y=0 in 1.19.2-2.0.6.2
Sakamoto45 opened this issue ยท 4 comments
All scanners don't work below 0
https://youtu.be/WSfPLBTy3cQ
I looked into code, i think the line to change is in ScannerTool.class, function getValueOfArea:
''for (BlockPos entry : Box.withRange(pos, getScanRadius(stack, false)).setValue(DirectionList.DOWN, 0)) {"
into
"for (BlockPos entry : Box.withRange(pos, getScanRadius(stack, false)).setValue(DirectionList.DOWN, -64)) {"
Wanted to simplify the work, thanks for a lot of work on the mod.
I'd say we should avoid hardcoding any limit here and if possible detect the world depth
@Sakamoto45 if i write will be fixed in the next patch then i know what the issue is and how to fix it.
It is just my phrasing to give feedback that i acknowledged the bug and no need to worry.
But i like to do bulk patches where i address like 20-30 bugs at once, its much faster that way and i can keep my head in other projects without getting ripped out all the time.
In this case your solution isn't fully correct since worlds can be expanded upon by datapacks or even just shifted.
I simply use the "level.getMinHeight" function (or how it was called) which accounts for all cases.
Also this bug is a relic out of 1.14.4-1.16.4 because this mod was in dev for so long.
Happens from time to time that one of them that i have overseen gets found.