Vector3i chunkPosition = chunk.getPosition();
ChunkImpl chunkImpl = (ChunkImpl) chunk;
boolean viaSnapshot = !deactivate;
if (viaSnapshot) {
chunkImpl.createSnapshot();
}
CompressedChunkBuilder compressedChunkBuilder = new CompressedChunkBuilder(entityStore, chunkImpl, viaSnapshot);
if (externalRefs.size() > 0) {
StoreMetadata metadata = new StoreMetadata(new ChunkStoreId(chunkPosition), externalRefs);