3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

SPIGOT-5558: Fix World#getHighestBlockAt, previously off by +1

Dieser Commit ist enthalten in:
ysl3000 2020-02-03 09:42:48 +11:00 committet von md_5
Ursprung d70084e53d
Commit 807a677e9a

Datei anzeigen

@ -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