SPIGOT-5558: Fix World#getHighestBlockAt, previously off by +1
By: ysl3000 <yannicklamprecht@live.de>
This commit is contained in:
parent
9adbf6f88b
commit
4eb5ed272f
1 changed files with 2 additions and 5 deletions
|
@ -291,11 +291,8 @@ public class CraftWorld implements World {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getHighestBlockYAt(int x, int z) {
|
public int getHighestBlockYAt(int x, int z) {
|
||||||
if (!isChunkLoaded(x >> 4, z >> 4)) {
|
// Transient load for this tick
|
||||||
getChunkAt(x >> 4, z >> 4); // Transient load for this tick
|
return world.getChunkAt(x >> 4, z >> 4).a(HeightMap.Type.MOTION_BLOCKING, x, z);
|
||||||
}
|
|
||||||
|
|
||||||
return world.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(x, 0, z)).getY();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue