Continue improving stabilises of the system
This commit is contained in:
@@ -224,4 +224,9 @@ public class ChunkWrapper implements IChunkWrapper
|
||||
//if (wrappedLevel != null) return wrappedLevel.getBlockState(new DhBlockPos(x + getMinX(), y, z + getMinZ()));
|
||||
return BlockStateWrapper.fromBlockState(chunk.getBlockState(new BlockPos(x,y,z)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStillValid() {
|
||||
return wrappedLevel == null || wrappedLevel.tryGetChunk(chunkPos) == this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ public class ClientLevelWrapper implements IClientLevelWrapper
|
||||
|
||||
@Override
|
||||
public IChunkWrapper tryGetChunk(DhChunkPos pos) {
|
||||
if (!level.hasChunk(pos.x, pos.z)) return null;
|
||||
ChunkAccess chunk = level.getChunk(pos.getX(), pos.getZ(), ChunkStatus.EMPTY, false);
|
||||
if (chunk == null) return null;
|
||||
return new ChunkWrapper(chunk, level, this);
|
||||
|
||||
@@ -153,6 +153,7 @@ public class ServerLevelWrapper implements IServerLevelWrapper
|
||||
}
|
||||
@Override
|
||||
public IChunkWrapper tryGetChunk(DhChunkPos pos) {
|
||||
if (!level.hasChunk(pos.x, pos.z)) return null;
|
||||
ChunkAccess chunk = level.getChunk(pos.getX(), pos.getZ(), ChunkStatus.EMPTY, false);
|
||||
if (chunk == null) return null;
|
||||
return new ChunkWrapper(chunk, level, this);
|
||||
|
||||
+1
-1
Submodule coreSubProjects updated: 4158573129...905e73fd1c
Reference in New Issue
Block a user