mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-19 12:15:32 +00:00
This is the same bug that Entity->getBlocksAround() had, except this actually checks for BB intersections. What this means is that as a result of the bug, one extra layer of blocks is unnecessarily checked on the max sides of the BB. For example: Assume you have a BB with maxY -5.5 You're definitely colliding with block -6 (because you're inside it) and you want to check an extra block in case you hit something weird like a fence. So you want to check _at most_ up to block -5 (inclusive). Following this maths: -5.5 + 1 = -4.5 ceil(-4.5) = -4 This causes us to check block -4 unnecessarily. This may be a performance waste - depending on the BB size it could be proportionally a lot of blocks getting unnecessarily checked. This has not been benchmarked.