3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-03 14:50:19 +01:00

Create a new cached chunk when a block is created in an empty chunk

Dieser Commit ist enthalten in:
Camotoy 2021-06-27 23:25:51 -04:00
Ursprung 215ffc618f
Commit ad5356472d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -75,9 +75,18 @@ public class ChunkCache {
}
Chunk chunk = column.getChunks()[(y >> 4) - getChunkMinY()];
if (chunk != null) {
chunk.set(x & 0xF, y & 0xF, z & 0xF, block);
if (chunk == null) {
if (block != BlockTranslator.JAVA_AIR_ID) {
chunk = new Chunk();
// A previously empty chunk, which is no longer empty as a
column.getChunks()[(y >> 4) - getChunkMinY()] = chunk;
} else {
// Nothing to update
return;
}
}
chunk.set(x & 0xF, y & 0xF, z & 0xF, block);
}
public int getBlockAt(int x, int y, int z) {