mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-27 02:31:43 +01:00
Fixed world.getHighestBlockYAt(x,z) returning 0 for existing but not loaded chunks. This fixes BUKKIT-327. Thanks for dredhorse for the pull request!
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
1dc1506bef
commit
3d1cb5ac40
@ -74,6 +74,10 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getHighestBlockYAt(int x, int z) {
|
public int getHighestBlockYAt(int x, int z) {
|
||||||
|
if (!isChunkLoaded(x >> 4, z >> 4)){
|
||||||
|
loadChunk(x >> 4, z >> 4);
|
||||||
|
}
|
||||||
|
|
||||||
return world.getHighestBlockYAt(x, z);
|
return world.getHighestBlockYAt(x, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user