This commit is contained in:
Jesse Boyd 2016-09-30 23:32:49 +10:00
parent c533f0bae9
commit 5ed2190cb3

View File

@ -178,7 +178,14 @@ public class BukkitUtil extends WorldUtil {
@Override @Override
public int getHighestBlock(String world, int x, int z) { public int getHighestBlock(String world, int x, int z) {
return getWorld(world).getHighestBlockAt(x, z).getY(); World bukkitWorld = getWorld(world);
for (int y = bukkitWorld.getMaxHeight() - 1; y > 0; y--) {
Block block = bukkitWorld.getBlockAt(x, y, z);
if (block != null && block.getType().isSolid()) {
return y+1;
}
}
return 0;
} }
@Override @Override