Merge branch 'main' of gitlab.com:distant-horizons-team/distant-horizons-core
This commit is contained in:
+11
@@ -138,6 +138,17 @@ public class GeneratedFullDataSourceProvider extends FullDataSourceProviderV2 im
|
||||
// world gen (data source retrieval) //
|
||||
//===================================//
|
||||
|
||||
public byte lowestDataDetailLevel()
|
||||
{
|
||||
IFullDataSourceRetrievalQueue fullDataSourceRetrievalQueue = this.worldGenQueueRef.get();
|
||||
if (fullDataSourceRetrievalQueue == null)
|
||||
{
|
||||
return DhSectionPos.SECTION_MINIMUM_DETAIL_LEVEL;
|
||||
}
|
||||
|
||||
return (byte) (DhSectionPos.SECTION_MINIMUM_DETAIL_LEVEL + fullDataSourceRetrievalQueue.lowestDataDetail());
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns the queue for handling world gen and does first time setup as well. <br>
|
||||
* Assumes there isn't a pre-existing queue.
|
||||
|
||||
+7
-1
@@ -19,6 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.core.file.fullDatafile;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.seibel.distanthorizons.core.dataObjects.fullData.sources.FullDataSourceV2;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.core.file.structure.ISaveStructure;
|
||||
@@ -32,9 +33,11 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftCli
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Only handles {@link SyncOnLoadRequestQueue} requests (IE updating existing LODs based on a timestamp).
|
||||
@@ -46,7 +49,10 @@ public class RemoteFullDataSourceProvider extends GeneratedFullDataSourceProvide
|
||||
|
||||
@Nullable
|
||||
private final SyncOnLoadRequestQueue syncOnLoadRequestQueue;
|
||||
private final Set<Long> visitedPositions = ConcurrentHashMap.newKeySet();
|
||||
private final Set<Long> visitedPositions = Collections.newSetFromMap(CacheBuilder.newBuilder()
|
||||
.expireAfterWrite(20, TimeUnit.MINUTES)
|
||||
.<Long, Boolean>build()
|
||||
.asMap());
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -219,10 +219,9 @@ public class FullDataSourceRequestHandler
|
||||
{
|
||||
if (this.fullDataSourceProvider().isFullyGenerated(fullDataSource.columnGenerationSteps))
|
||||
{
|
||||
LOGGER.info("sending - complete [" + DhSectionPos.toString(pos) + "]");
|
||||
requestGroup.fullDataSource = fullDataSource;
|
||||
}
|
||||
else if (!this.serverLevel.isNSizedGenerationSupported() && DhSectionPos.getDetailLevel(pos) > DhSectionPos.SECTION_MINIMUM_DETAIL_LEVEL)
|
||||
else if (DhSectionPos.getDetailLevel(pos) > this.serverLevel.serverside.fullDataFileHandler.lowestDataDetailLevel())
|
||||
{
|
||||
// Make this group unavailable for adding into
|
||||
this.requestGroupsByPos.remove(pos);
|
||||
|
||||
-1
@@ -30,7 +30,6 @@ import io.netty.buffer.ByteBuf;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
// TODO appears to be useless yelling at user
|
||||
public class ExceptionMessage extends AbstractTrackableMessage
|
||||
{
|
||||
private static final List<Class<? extends Exception>> EXCEPTION_LIST = new ArrayList<Class<? extends Exception>>()
|
||||
|
||||
Reference in New Issue
Block a user