Update upstream B/CB
--- work/Bukkit Submodule work/Bukkit 6a4242cb..337955e3: > SPIGOT-5468: Improve Beehive TileEntity API > #473: Add an API for passing the heightmap to getHighestBlockAt* method --- work/CraftBukkit Submodule work/CraftBukkit 807a677e..708be695: > SPIGOT-5468: Improve Beehive TileEntity API > #624: Add an API for passing the heightmap to getHighestBlockAt* method > MC-135989, SPIGOT-5564: Don't kick players for flight while riptiding This deprecates the Paper getHighestBlockAt HeightMap APIs now that Bukkit has added their own. These methods will stick around long enough for people to migrate. Their API is pretty much the same as ours, migration should be quick and easy.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From c2974ae8735072bfab8a59203b89a130cb47643b Mon Sep 17 00:00:00 2001
|
||||
From 845e98cc02f7ce3a77ee8bddce44efc8d8392946 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Tue, 1 Jan 2019 02:22:01 -0800
|
||||
Subject: [PATCH] Add Heightmap API
|
||||
@@ -20,11 +20,11 @@ index b506f5871..406e5c60a 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 e92566696..c0fc11857 100644
|
||||
index 323d78b22..27602824a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -337,6 +337,29 @@ public class CraftWorld implements World {
|
||||
return world.getChunkAt(x >> 4, z >> 4).a(HeightMap.Type.MOTION_BLOCKING, x, z);
|
||||
@@ -335,6 +335,29 @@ public class CraftWorld implements World {
|
||||
return getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING);
|
||||
}
|
||||
|
||||
+ // Paper start - Implement heightmap api
|
||||
@@ -37,13 +37,13 @@ index e92566696..c0fc11857 100644
|
||||
+ throw new UnsupportedOperationException(); // TODO
|
||||
+ //return this.world.getHighestBlockY(HeightMap.Type.LIGHT_BLOCKING, x, z);
|
||||
+ case ANY:
|
||||
+ return this.world.getHighestBlockY(HeightMap.Type.WORLD_SURFACE, x, z);
|
||||
+ return this.world.getHighestBlockY(net.minecraft.server.HeightMap.Type.WORLD_SURFACE, x, z);
|
||||
+ case SOLID:
|
||||
+ return this.world.getHighestBlockY(HeightMap.Type.OCEAN_FLOOR, x, z);
|
||||
+ return this.world.getHighestBlockY(net.minecraft.server.HeightMap.Type.OCEAN_FLOOR, x, z);
|
||||
+ case SOLID_OR_LIQUID:
|
||||
+ return this.world.getHighestBlockY(HeightMap.Type.MOTION_BLOCKING, x, z);
|
||||
+ return this.world.getHighestBlockY(net.minecraft.server.HeightMap.Type.MOTION_BLOCKING, x, z);
|
||||
+ case SOLID_OR_LIQUID_NO_LEAVES:
|
||||
+ return this.world.getHighestBlockY(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, x, z);
|
||||
+ return this.world.getHighestBlockY(net.minecraft.server.HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, x, z);
|
||||
+ default:
|
||||
+ throw new UnsupportedOperationException();
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user