Dylan K. Taylor c9a0c381b1 Level: fixed logical errors in getCollisionBlocks() and getCollisionCubes()
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.
2018-05-28 12:37:17 +01:00
..