mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 00:22:08 -07:00
More 1.14 patches
now we can rebase
This commit is contained in:
@@ -5,23 +5,26 @@ Subject: [PATCH] Add Heightmap API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index b940f95bdb..d20f6ac7e4 100644
|
||||
index a038945b36..54a03fb102 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
}
|
||||
}
|
||||
|
||||
- @Override
|
||||
- public int a(HeightMap.Type heightmap_type, int i, int j) {
|
||||
+ public final int getHighestBlockY(final HeightMap.Type heightmap, final int x, final int z) { return this.a(heightmap, x, z); } // Paper - OBFHELPER
|
||||
public int a(HeightMap.Type heightmap_type, int i, int j) {
|
||||
+ @Override public int a(HeightMap.Type heightmap_type, int i, int j) { // Paper - OBFHELPER
|
||||
int k;
|
||||
|
||||
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 40ee34675c..457aa5a3f0 100644
|
||||
index 5e672ae2e4..d8ea548383 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 {
|
||||
return world.getHighestBlockYAt(HeightMap.Type.LIGHT_BLOCKING, new BlockPosition(x, 0, z)).getY();
|
||||
return world.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(x, 0, z)).getY();
|
||||
}
|
||||
|
||||
+ // Paper start - Implement heightmap api
|
||||
@@ -31,7 +34,8 @@ index 40ee34675c..457aa5a3f0 100644
|
||||
+
|
||||
+ switch (heightmap) {
|
||||
+ case LIGHT_BLOCKING:
|
||||
+ return this.world.getHighestBlockY(HeightMap.Type.LIGHT_BLOCKING, x, z);
|
||||
+ 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);
|
||||
+ case SOLID:
|
||||
|
Reference in New Issue
Block a user