trim get where chunk SET is remembered from a previous session

This commit is contained in:
dordsor21 2020-10-03 15:53:49 +01:00
parent 346762d93b
commit 1f02287caa
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -389,6 +389,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
public IChunkGet get(ChunkHolder chunk) { public IChunkGet get(ChunkHolder chunk) {
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.chunkExisting; return chunk.chunkExisting;
} }
@ -446,6 +447,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
public BiomeType getBiome(ChunkHolder chunk, int x, int y, int z) { public BiomeType getBiome(ChunkHolder chunk, int x, int y, int z) {
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.getBiomeType(x, y, z); return chunk.getBiomeType(x, y, z);
} }
@ -453,6 +455,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
public BlockState getBlock(ChunkHolder chunk, int x, int y, int z) { public BlockState getBlock(ChunkHolder chunk, int x, int y, int z) {
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.getBlock(x, y, z); return chunk.getBlock(x, y, z);
} }
@ -461,6 +464,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
int z) { int z) {
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.getFullBlock(x, y, z); return chunk.getFullBlock(x, y, z);
} }
@ -477,6 +481,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
} }
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.getSkyLight(x, y, z); return chunk.getSkyLight(x, y, z);
} }
@ -493,6 +498,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
} }
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.getEmmittedLight(x, y, z); return chunk.getEmmittedLight(x, y, z);
} }
@ -500,6 +506,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
public int getBrightness(ChunkHolder chunk, int x, int y, int z) { public int getBrightness(ChunkHolder chunk, int x, int y, int z) {
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.getBrightness(x, y, z); return chunk.getBrightness(x, y, z);
} }
@ -507,12 +514,14 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
public int getOpacity(ChunkHolder chunk, int x, int y, int z) { public int getOpacity(ChunkHolder chunk, int x, int y, int z) {
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.getOpacity(x, y, z); return chunk.getOpacity(x, y, z);
} }
@Override public int[] getHeightMap(ChunkHolder chunk, HeightMapType type) { @Override public int[] getHeightMap(ChunkHolder chunk, HeightMapType type) {
chunk.getOrCreateGet(); chunk.getOrCreateGet();
chunk.delegate = BOTH; chunk.delegate = BOTH;
chunk.chunkExisting.trim(false);
return chunk.getHeightMap(type); return chunk.getHeightMap(type);
} }
}; };