Latest progress - restored patches, some issues resolved
This commit is contained in:
@@ -17,8 +17,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public boolean isLoadedAndInBounds(BlockPosition blockposition) {
|
||||
+ return getWorldBorder().isInBounds(blockposition) && getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) != null;
|
||||
+ }
|
||||
+ public Chunk getChunkIfLoaded(BlockPosition blockposition) {
|
||||
+ return getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+
|
||||
+ public Chunk getChunkIfLoaded(int x, int z) {
|
||||
+ return ((WorldServer) this).getChunkProvider().getChunkAtIfLoadedImmediately(x, z);
|
||||
+ }
|
||||
+ public final Chunk getChunkIfLoaded(BlockPosition blockposition) {
|
||||
+ return ((WorldServer) this).getChunkProvider().getChunkAtIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ }
|
||||
+
|
||||
+ // reduces need to do isLoaded before getType
|
||||
@@ -40,3 +44,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public boolean a(BlockPosition blockposition) {
|
||||
return (double) (blockposition.getX() + 1) > this.e() && (double) blockposition.getX() < this.g() && (double) (blockposition.getZ() + 1) > this.f() && (double) blockposition.getZ() < this.h();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
public final Convertable.ConversionSession convertable;
|
||||
public final UUID uuid;
|
||||
|
||||
- public Chunk getChunkIfLoaded(int x, int z) {
|
||||
+ @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
return this.chunkProvider.getChunkAt(x, z, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user