mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-05 09:20:18 -05:00
SPIGOT-5558: Fix World#getHighestBlockAt, previously off by +1
This commit is contained in:
1 parent
d70084e53d
commit
807a677e9a
1 file changed
+2
-5
@@ -291,11 +291,8 @@ public class CraftWorld implements World {
|
||||
|
||||
@Override
|
||||
public int getHighestBlockYAt(int x, int z) {
|
||||
if (!isChunkLoaded(x >> 4, z >> 4)) {
|
||||
getChunkAt(x >> 4, z >> 4); // Transient load for this tick
|
||||
}
|
||||
|
||||
return world.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(x, 0, z)).getY();
|
||||
// Transient load for this tick
|
||||
return world.getChunkAt(x >> 4, z >> 4).a(HeightMap.Type.MOTION_BLOCKING, x, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user