More compile fixes
This commit is contained in:
@@ -117,33 +117,32 @@ index 55373cae0..cfffbd031 100644
|
||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
index 11c4d23ba..818872944 100644
|
||||
index 11c4d23ba..53c15c1c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
protected final int b;
|
||||
protected final IChunkAccess[][] c;
|
||||
protected boolean d;
|
||||
- protected final World e;
|
||||
+ protected final World e; protected final World getWorld() { return e; } // Paper - OBFHELPER
|
||||
|
||||
public ChunkCache(World world, BlockPosition blockposition, BlockPosition blockposition1) {
|
||||
this.e = world;
|
||||
@@ -0,0 +0,0 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
return this.a(i, j);
|
||||
}
|
||||
|
||||
+ // Paper start - if loaded util
|
||||
+ @Nullable
|
||||
+ @Override
|
||||
+ public IChunkAccess getChunkIfLoadedImmediately(int x, int z) {
|
||||
+ IChunkAccess chunk = this.getChunkAt(x, z, ChunkStatus.FULL, false);
|
||||
+ if (chunk instanceof ChunkEmpty) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ return chunk;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Fluid getFluidIfLoaded(BlockPosition blockposition) {
|
||||
+ IChunkAccess chunk = this.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ IChunkAccess chunk = getWorld().getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ return chunk == null ? null : chunk.getFluid(blockposition);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public IBlockData getTypeIfLoaded(BlockPosition blockposition) {
|
||||
+ IChunkAccess chunk = this.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ IChunkAccess chunk = getWorld().getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ return chunk == null ? null : chunk.getType(blockposition);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
Reference in New Issue
Block a user