rename ChunkSizedFullData -> ChunkSizedFullDataSource

This commit is contained in:
James Seibel
2023-02-18 09:30:12 -06:00
parent e4b5a7cb93
commit fbcf687ef9
24 changed files with 58 additions and 58 deletions
@@ -1,6 +1,6 @@
package com.seibel.lod.core.datatype;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.full.FullDataPointIdMap;
import com.seibel.lod.core.datatype.full.accessor.SingleFullArrayView;
import com.seibel.lod.core.file.fullDatafile.FullDataMetaFile;
@@ -18,7 +18,7 @@ public interface IFullDataSource
byte getDataVersion();
void update(ChunkSizedFullData data);
void update(ChunkSizedFullDataSource data);
boolean isEmpty();
@@ -1,6 +1,6 @@
package com.seibel.lod.core.datatype;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.level.IDhClientLevel;
import com.seibel.lod.core.pos.DhSectionPos;
import com.seibel.lod.core.render.LodQuadTree;
@@ -47,7 +47,7 @@ public interface IRenderSource
boolean isEmpty();
void fastWrite(ChunkSizedFullData chunkData, IDhClientLevel level);
void fastWrite(ChunkSizedFullDataSource chunkData, IDhClientLevel level);
/** Overrides any data that has not been written directly using write(). Skips empty source dataPoints. */
void updateFromRenderSource(IRenderSource source);
@@ -1,6 +1,6 @@
package com.seibel.lod.core.datatype;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.level.IDhClientLevel;
import com.seibel.lod.core.pos.DhSectionPos;
import com.seibel.lod.core.render.LodQuadTree;
@@ -54,7 +54,7 @@ public class PlaceHolderRenderSource implements IRenderSource
public boolean isEmpty() { return true; }
@Override
public void fastWrite(ChunkSizedFullData chunkData, IDhClientLevel level) { /* TODO */ }
public void fastWrite(ChunkSizedFullDataSource chunkData, IDhClientLevel level) { /* TODO */ }
@Override
public void updateFromRenderSource(IRenderSource source) { /* TODO */ }
@@ -3,7 +3,7 @@ package com.seibel.lod.core.datatype.column;
import com.seibel.lod.core.ModInfo;
import com.seibel.lod.core.datatype.column.accessor.*;
import com.seibel.lod.core.datatype.column.render.ColumnRenderBuffer;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.transform.FullToColumnTransformer;
import com.seibel.lod.core.level.IDhClientLevel;
import com.seibel.lod.core.pos.DhSectionPos;
@@ -304,7 +304,7 @@ public class ColumnRenderSource implements IRenderSource, IColumnDatatype
}
@Override
public void fastWrite(ChunkSizedFullData chunkData, IDhClientLevel level) { FullToColumnTransformer.writeFullDataChunkToColumnData(this, level, chunkData); }
public void fastWrite(ChunkSizedFullDataSource chunkData, IDhClientLevel level) { FullToColumnTransformer.writeFullDataChunkToColumnData(this, level, chunkData); }
@@ -3,13 +3,13 @@ package com.seibel.lod.core.datatype.full;
import com.seibel.lod.core.datatype.full.accessor.FullArrayView;
import com.seibel.lod.core.pos.DhLodPos;
public class ChunkSizedFullData extends FullArrayView
public class ChunkSizedFullDataSource extends FullArrayView
{
public final byte dataDetail;
public final int x;
public final int z;
public ChunkSizedFullData(byte dataDetail, int x, int z)
public ChunkSizedFullDataSource(byte dataDetail, int x, int z)
{
super(new FullDataPointIdMap(), new long[16 * 16][0], 16);
this.dataDetail = dataDetail;
@@ -60,7 +60,7 @@ public class FullDataSource extends FullArrayView implements IFullDataSource
public SingleFullArrayView tryGet(int x, int z) { return this.get(x, z); }
@Override
public void update(ChunkSizedFullData data)
public void update(ChunkSizedFullDataSource data)
{
LodUtil.assertTrue(this.sectionPos.getSectionBBoxPos().overlaps(data.getBBoxLodPos()));
if (data.dataDetail == 0 && this.getDataDetail() == 0)
@@ -47,7 +47,7 @@ public class SingleChunkFullDataSource extends FullArrayView implements IIncompl
public byte getDataVersion() { return LATEST_VERSION; }
@Override
public void update(ChunkSizedFullData data)
public void update(ChunkSizedFullDataSource data)
{
LodUtil.assertTrue(this.sectionPos.getSectionBBoxPos().overlaps(data.getBBoxLodPos()));
@@ -103,7 +103,7 @@ public class SparseFullDataSource implements IIncompleteFullDataSource
@Override
public void update(ChunkSizedFullData data)
public void update(ChunkSizedFullDataSource data)
{
if (data.dataDetail != 0)
{
@@ -3,7 +3,7 @@ package com.seibel.lod.core.datatype.transform;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.config.Config;
import com.seibel.lod.core.logging.ConfigBasedLogger;
import com.seibel.lod.core.pos.DhChunkPos;
@@ -21,9 +21,9 @@ public class ChunkToLodBuilder
private static class Task
{
final DhChunkPos chunkPos;
final CompletableFuture<ChunkSizedFullData> future;
final CompletableFuture<ChunkSizedFullDataSource> future;
Task(DhChunkPos chunkPos, CompletableFuture<ChunkSizedFullData> future)
Task(DhChunkPos chunkPos, CompletableFuture<ChunkSizedFullDataSource> future)
{
this.chunkPos = chunkPos;
this.future = future;
@@ -36,7 +36,7 @@ public class ChunkToLodBuilder
public CompletableFuture<ChunkSizedFullData> tryGenerateData(IChunkWrapper chunk)
public CompletableFuture<ChunkSizedFullDataSource> tryGenerateData(IChunkWrapper chunk)
{
if (chunk == null)
throw new NullPointerException("ChunkWrapper cannot be null!");
@@ -49,7 +49,7 @@ public class ChunkToLodBuilder
return null;
// Otherwise, it means we're the first to do so. Lets submit our task to this entry.
CompletableFuture<ChunkSizedFullData> future = new CompletableFuture<>();
CompletableFuture<ChunkSizedFullDataSource> future = new CompletableFuture<>();
taskToBuild.addLast(new Task(chunk.getChunkPos(), future));
return future;
}
@@ -105,7 +105,7 @@ public class ChunkToLodBuilder
{
if (LodDataBuilder.canGenerateLodFromChunk(latestChunk))
{
ChunkSizedFullData data = LodDataBuilder.createChunkData(latestChunk);
ChunkSizedFullDataSource data = LodDataBuilder.createChunkData(latestChunk);
if (data != null)
{
task.future.complete(data);
@@ -94,7 +94,7 @@ public class FullToColumnTransformer {
return columnSource;
}
public static void writeFullDataChunkToColumnData(ColumnRenderSource render, IDhClientLevel level, ChunkSizedFullData data) {
public static void writeFullDataChunkToColumnData(ColumnRenderSource render, IDhClientLevel level, ChunkSizedFullDataSource data) {
if (data.dataDetail != 0)
throw new UnsupportedOperationException("To be implemented");
@@ -1,6 +1,6 @@
package com.seibel.lod.core.datatype.transform;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.full.FullDataPoint;
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
import com.seibel.lod.core.util.LodUtil;
@@ -12,10 +12,10 @@ import it.unimi.dsi.fastutil.longs.LongArrayList;
public class LodDataBuilder {
private static final IBlockStateWrapper AIR = SingletonInjector.INSTANCE.get(IWrapperFactory.class).getAirBlockStateWrapper();
public static ChunkSizedFullData createChunkData(IChunkWrapper chunk) {
public static ChunkSizedFullDataSource createChunkData(IChunkWrapper chunk) {
if (!canGenerateLodFromChunk(chunk)) return null;
ChunkSizedFullData chunkData = new ChunkSizedFullData((byte)0, chunk.getChunkPos().x, chunk.getChunkPos().z);
ChunkSizedFullDataSource chunkData = new ChunkSizedFullDataSource((byte)0, chunk.getChunkPos().x, chunk.getChunkPos().z);
for (int x=0; x<16; x++) {
for (int z=0; z<16; z++) {
@@ -3,7 +3,7 @@ package com.seibel.lod.core.file.fullDatafile;
import com.google.common.collect.HashMultimap;
import com.seibel.lod.core.datatype.IFullDataSource;
import com.seibel.lod.core.datatype.IIncompleteFullDataSource;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.full.FullDataSource;
import com.seibel.lod.core.datatype.full.SingleChunkFullDataSource;
import com.seibel.lod.core.datatype.full.SparseFullDataSource;
@@ -292,14 +292,14 @@ public class FullDataFileHandler implements IFullDataSourceProvider
/** This call is concurrent. I.e. it supports being called by multiple threads at the same time. */
@Override
public void write(DhSectionPos sectionPos, ChunkSizedFullData chunkData)
public void write(DhSectionPos sectionPos, ChunkSizedFullDataSource chunkData)
{
DhLodPos chunkPos = new DhLodPos((byte) (chunkData.dataDetail+4), chunkData.x, chunkData.z);
LodUtil.assertTrue(chunkPos.overlaps(sectionPos.getSectionBBoxPos()), "Chunk {} does not overlap section {}", chunkPos, sectionPos);
chunkPos = chunkPos.convertToDetailLevel((byte) this.minDetailLevel);
this.recursiveWrite(new DhSectionPos(chunkPos.detailLevel, chunkPos.x, chunkPos.z), chunkData);
}
private void recursiveWrite(DhSectionPos sectionPos, ChunkSizedFullData chunkData)
private void recursiveWrite(DhSectionPos sectionPos, ChunkSizedFullDataSource chunkData)
{
FullDataMetaFile metaFile = this.files.get(sectionPos);
if (metaFile != null)
@@ -10,7 +10,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
import com.seibel.lod.core.datatype.IFullDataSource;
import com.seibel.lod.core.datatype.AbstractDataSourceLoader;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
import com.seibel.lod.core.file.metaData.MetaData;
import com.seibel.lod.core.pos.DhLodPos;
@@ -46,7 +46,7 @@ public class FullDataMetaFile extends AbstractMetaDataFile
//TODO: use ConcurrentAppendSingleSwapContainer<LodDataSource> instead of below:
private static class GuardedMultiAppendQueue {
ReentrantReadWriteLock appendLock = new ReentrantReadWriteLock();
ConcurrentLinkedQueue<ChunkSizedFullData> queue = new ConcurrentLinkedQueue<>();
ConcurrentLinkedQueue<ChunkSizedFullDataSource> queue = new ConcurrentLinkedQueue<>();
}
// ===Concurrent Write stuff===
@@ -140,7 +140,7 @@ public class FullDataMetaFile extends AbstractMetaDataFile
// }
// }
public void addToWriteQueue(ChunkSizedFullData datatype) {
public void addToWriteQueue(ChunkSizedFullDataSource datatype) {
debugCheck();
DhLodPos chunkPos = new DhLodPos((byte) (datatype.dataDetail + 4), datatype.x, datatype.z);
LodUtil.assertTrue(pos.getSectionBBoxPos().overlaps(chunkPos), "Chunk pos {} doesn't overlap with section {}", chunkPos, pos);
@@ -377,7 +377,7 @@ public class FullDataMetaFile extends AbstractMetaDataFile
{
this.swapWriteQueue();
int count = this._backQueue.queue.size();
for (ChunkSizedFullData chunk : this._backQueue.queue)
for (ChunkSizedFullDataSource chunk : this._backQueue.queue)
{
data.update(chunk);
}
@@ -2,7 +2,7 @@ package com.seibel.lod.core.file.fullDatafile;
import com.seibel.lod.core.datatype.IFullDataSource;
import com.seibel.lod.core.datatype.IIncompleteFullDataSource;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.full.SparseFullDataSource;
import com.seibel.lod.core.datatype.full.SingleChunkFullDataSource;
import com.seibel.lod.core.generation.tasks.AbstractWorldGenTaskTracker;
@@ -158,7 +158,7 @@ public class GeneratedFullDataFileHandler extends FullDataFileHandler
public boolean isMemoryAddressValid() { return this.targetData.get() != null; }
@Override
public Consumer<ChunkSizedFullData> getConsumer()
public Consumer<ChunkSizedFullDataSource> getConsumer()
{
if (this.loadedTargetData == null)
{
@@ -1,7 +1,7 @@
package com.seibel.lod.core.file.fullDatafile;
import com.seibel.lod.core.datatype.IFullDataSource;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.file.metaData.MetaData;
import com.seibel.lod.core.pos.DhSectionPos;
@@ -16,7 +16,7 @@ public interface IFullDataSourceProvider extends AutoCloseable {
void addScannedFile(Collection<File> detectedFiles);
CompletableFuture<IFullDataSource> read(DhSectionPos pos);
void write(DhSectionPos sectionPos, ChunkSizedFullData chunkData);
void write(DhSectionPos sectionPos, ChunkSizedFullDataSource chunkData);
CompletableFuture<Void> flushAndSave();
//long getCacheVersion(DhSectionPos sectionPos);
@@ -1,7 +1,7 @@
package com.seibel.lod.core.file.renderfile;
import com.seibel.lod.core.datatype.IRenderSource;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.pos.DhSectionPos;
import java.io.File;
@@ -18,7 +18,7 @@ public interface ILodRenderSourceProvider extends AutoCloseable
{
CompletableFuture<IRenderSource> read(DhSectionPos pos);
void addScannedFile(Collection<File> detectedFiles);
void write(DhSectionPos sectionPos, ChunkSizedFullData chunkData);
void write(DhSectionPos sectionPos, ChunkSizedFullDataSource chunkData);
CompletableFuture<Void> flushAndSave();
/** Returns true if the data was refreshed, false otherwise */
@@ -6,7 +6,7 @@ import com.seibel.lod.core.datatype.PlaceHolderRenderSource;
import com.seibel.lod.core.datatype.IRenderSource;
import com.seibel.lod.core.datatype.AbstractRenderSourceLoader;
import com.seibel.lod.core.datatype.column.ColumnRenderSource;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.transform.DataRenderTransformer;
import com.seibel.lod.core.file.fullDatafile.IFullDataSourceProvider;
import com.seibel.lod.core.level.IDhClientLevel;
@@ -218,12 +218,12 @@ public class RenderFileHandler implements ILodRenderSourceProvider
/* This call is concurrent. I.e. it supports multiple threads calling this method at the same time. */
@Override
public void write(DhSectionPos sectionPos, ChunkSizedFullData chunkData)
public void write(DhSectionPos sectionPos, ChunkSizedFullDataSource chunkData)
{
this.writeRecursively(sectionPos,chunkData);
this.fullDataSourceProvider.write(sectionPos, chunkData); // TODO why is there fullData handling in the render file handler?
}
private void writeRecursively(DhSectionPos sectPos, ChunkSizedFullData chunkData)
private void writeRecursively(DhSectionPos sectPos, ChunkSizedFullDataSource chunkData)
{
if (!sectPos.getSectionBBoxPos().overlaps(new DhLodPos((byte) (4 + chunkData.dataDetail), chunkData.x, chunkData.z)))
{
@@ -2,7 +2,7 @@ package com.seibel.lod.core.file.renderfile;
import com.seibel.lod.core.datatype.IRenderSource;
import com.seibel.lod.core.datatype.AbstractRenderSourceLoader;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.file.metaData.MetaData;
import com.seibel.lod.core.level.IDhClientLevel;
import com.seibel.lod.core.level.IDhLevel;
@@ -86,7 +86,7 @@ public class RenderMetaDataFile extends AbstractMetaDataFile
// FIXME: This can cause concurrent modification of LodRenderSource.
// Not sure if it will cause issues or not.
public void updateChunkIfNeeded(ChunkSizedFullData chunkData, IDhClientLevel level)
public void updateChunkIfNeeded(ChunkSizedFullDataSource chunkData, IDhClientLevel level)
{
DhLodPos chunkPos = new DhLodPos((byte) (chunkData.dataDetail + 4), chunkData.x, chunkData.z);
LodUtil.assertTrue(this.pos.getSectionBBoxPos().overlaps(chunkPos), "Chunk pos {} doesn't overlap with section {}", chunkPos, pos);
@@ -2,7 +2,7 @@ package com.seibel.lod.core.file.subDimMatching;
import com.seibel.lod.core.config.Config;
import com.seibel.lod.core.datatype.IFullDataSource;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.full.FullDataPoint;
import com.seibel.lod.core.datatype.full.accessor.SingleFullArrayView;
import com.seibel.lod.core.datatype.transform.LodDataBuilder;
@@ -164,20 +164,20 @@ public class SubDimensionLevelMatcher implements AutoCloseable
LOGGER.info("Player block pos in dimension: [" + playerData.playerBlockPos.getX() + "," + playerData.playerBlockPos.getY() + "," + playerData.playerBlockPos.getZ() + "]");
// new chunk data
ChunkSizedFullData newChunkSizedFullData = LodDataBuilder.createChunkData(newlyLoadedChunk);
ChunkSizedFullDataSource newChunkSizedFullDataSource = LodDataBuilder.createChunkData(newlyLoadedChunk);
long[][][] newChunkData = new long[LodUtil.CHUNK_WIDTH][LodUtil.CHUNK_WIDTH][];
if (newChunkSizedFullData != null)
if (newChunkSizedFullDataSource != null)
{
for (int x = 0; x < LodUtil.CHUNK_WIDTH; x++)
{
for (int z = 0; z < LodUtil.CHUNK_WIDTH; z++)
{
long[] array = newChunkSizedFullData.get(x, z).getRaw();
long[] array = newChunkSizedFullDataSource.get(x, z).getRaw();
newChunkData[x][z] = array;
}
}
}
boolean newChunkHasData = newChunkSizedFullData != null && newChunkSizedFullData.nonEmptyCount() != 0;
boolean newChunkHasData = newChunkSizedFullDataSource != null && newChunkSizedFullDataSource.nonEmptyCount() != 0;
// check if the chunk is actually empty
if (!newChunkHasData)
@@ -3,7 +3,7 @@ package com.seibel.lod.core.generation;
import com.seibel.lod.api.enums.worldGeneration.EDhApiDistantGeneratorMode;
import com.seibel.lod.api.interfaces.override.worldGenerator.IDhApiWorldGenerator;
import com.seibel.lod.core.config.Config;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.transform.LodDataBuilder;
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
import com.seibel.lod.core.generation.tasks.*;
@@ -674,7 +674,7 @@ public class WorldGenerationQueue implements Closeable
private static CompletableFuture<Void> startGenerationEvent(IDhApiWorldGenerator worldGenerator,
DhChunkPos chunkPosMin,
byte granularity, byte targetDataDetail,
Consumer<ChunkSizedFullData> resultConsumer)
Consumer<ChunkSizedFullDataSource> resultConsumer)
{
EDhApiDistantGeneratorMode generatorMode = Config.Client.WorldGenerator.distantGeneratorMode.get();
return worldGenerator.generateChunks(chunkPosMin.x, chunkPosMin.z, granularity, targetDataDetail, generatorMode, (objectArray) ->
@@ -1,6 +1,6 @@
package com.seibel.lod.core.generation.tasks;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import java.util.function.Consumer;
@@ -16,6 +16,6 @@ public abstract class AbstractWorldGenTaskTracker
*/
public abstract boolean isMemoryAddressValid();
public abstract Consumer<ChunkSizedFullData> getConsumer();
public abstract Consumer<ChunkSizedFullDataSource> getConsumer();
}
@@ -1,6 +1,6 @@
package com.seibel.lod.core.generation.tasks;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
@@ -52,6 +52,6 @@ public class SplitTaskTracker extends AbstractWorldGenTaskTracker
public boolean isMemoryAddressValid() { return this.isValid; }
@Override
public Consumer<ChunkSizedFullData> getConsumer() { return this.parentTracker.getConsumer(); }
public Consumer<ChunkSizedFullDataSource> getConsumer() { return this.parentTracker.getConsumer(); }
}
@@ -1,6 +1,6 @@
package com.seibel.lod.core.generation.tasks;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.pos.DhLodPos;
import java.util.Iterator;
@@ -28,13 +28,13 @@ public final class WorldGenTaskGroup
public void accept(ChunkSizedFullData data)
public void accept(ChunkSizedFullDataSource data)
{
Iterator<WorldGenTask> tasks = this.generatorTasks.iterator();
while (tasks.hasNext())
{
WorldGenTask task = tasks.next();
Consumer<ChunkSizedFullData> consumer = task.taskTracker.getConsumer();
Consumer<ChunkSizedFullDataSource> consumer = task.taskTracker.getConsumer();
if (consumer == null)
{
tasks.remove();
@@ -3,7 +3,7 @@ package com.seibel.lod.core.level;
import com.seibel.lod.api.interfaces.override.worldGenerator.IDhApiWorldGenerator;
import com.seibel.lod.core.DependencyInjection.WorldGeneratorInjector;
import com.seibel.lod.core.config.AppliedConfigState;
import com.seibel.lod.core.datatype.full.ChunkSizedFullData;
import com.seibel.lod.core.datatype.full.ChunkSizedFullDataSource;
import com.seibel.lod.core.datatype.full.FullDataSource;
import com.seibel.lod.core.datatype.transform.ChunkToLodBuilder;
import com.seibel.lod.core.file.fullDatafile.IFullDataSourceProvider;
@@ -124,7 +124,7 @@ public class DhClientServerLevel implements IDhClientLevel, IDhServerLevel
renderState.renderer.bufferHandler.update();
}
private void saveWrites(ChunkSizedFullData data)
private void saveWrites(ChunkSizedFullDataSource data)
{
RenderState renderState = this.renderStateRef.get();
DhLodPos pos = data.getBBoxLodPos().convertToDetailLevel(FullDataSource.SECTION_SIZE_OFFSET);
@@ -242,7 +242,7 @@ public class DhClientServerLevel implements IDhClientLevel, IDhServerLevel
@Override
public void updateChunkAsync(IChunkWrapper chunk)
{
CompletableFuture<ChunkSizedFullData> future = this.chunkToLodBuilder.tryGenerateData(chunk);
CompletableFuture<ChunkSizedFullDataSource> future = this.chunkToLodBuilder.tryGenerateData(chunk);
if (future != null)
{
future.thenAccept(this::saveWrites);