Handle gen flag for placeholder getChunkAtAsync (#2079)

Also fix a loadChunk call in heightmap api
This commit is contained in:
Spottedleaf
2019-05-26 22:17:12 -07:00
parent 4acb916956
commit 4a65bd4b04
8 changed files with 83 additions and 60 deletions

View File

@@ -20,7 +20,7 @@ index ad58d4fd63..c04d73e738 100644
if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3ebea96931..174d2d4ea0 100644
index 3ebea96931..2c6a42d921 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
@@ -30,7 +30,7 @@ index 3ebea96931..174d2d4ea0 100644
+ // Paper start - Implement heightmap api
+ @Override
+ public int getHighestBlockYAt(final int x, final int z, final com.destroystokyo.paper.HeightmapType heightmap) throws UnsupportedOperationException {
+ this.loadChunk(x >> 4, z >> 4); // heightmap will ret 0 on unloaded areas
+ this.getChunkAt(x >> 4, z >> 4); // heightmap will ret 0 on unloaded areas
+
+ switch (heightmap) {
+ case LIGHT_BLOCKING: