Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b0e7c31964 | |||
| 2e906b57c4 | |||
| 505dbe2f62 | |||
| 48c5828e8f | |||
| eb2317934f | |||
| 60537cda1b | |||
| 508ff2b776 |
@@ -32,13 +32,15 @@ public final class ModInfo
|
||||
|
||||
/** Incremented every time any packets are added, changed or removed, with a few exceptions. */
|
||||
public static final int PROTOCOL_VERSION = 13;
|
||||
public static final String WRAPPER_PACKET_PATH = "message";
|
||||
|
||||
/** The full plugin channel name (RESOURCE_NAMESPACE:WRAPPER_PACKET_PATH) must be 20 characters or fewer for compatibility with <1.13. */
|
||||
public static final String WRAPPER_PACKET_PATH = "msg";
|
||||
|
||||
/** The internal mod name */
|
||||
public static final String NAME = "DistantHorizons";
|
||||
/** Human-readable version of NAME */
|
||||
public static final String READABLE_NAME = "Distant Horizons";
|
||||
public static final String VERSION = "2.4.4-b";
|
||||
public static final String VERSION = "2.4.6-b-dev";
|
||||
/** Returns true if the current build is an unstable developer build, false otherwise. */
|
||||
public static final boolean IS_DEV_BUILD = VERSION.toLowerCase().contains("dev");
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.seibel.distanthorizons.api.enums.config.EDhApiMcRenderingFadeMode;
|
||||
import com.seibel.distanthorizons.api.enums.rendering.EDhApiRenderPass;
|
||||
import com.seibel.distanthorizons.api.methods.events.abstractEvents.*;
|
||||
import com.seibel.distanthorizons.core.api.internal.rendering.DhRenderState;
|
||||
import com.seibel.distanthorizons.core.enums.EMinecraftColor;
|
||||
import com.seibel.distanthorizons.core.file.structure.ClientOnlySaveStructure;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.network.messages.MessageRegistry;
|
||||
@@ -152,10 +153,10 @@ public class ClientApi
|
||||
|
||||
if (Config.Common.Logging.Warning.showReplayWarningOnStartup.get())
|
||||
{
|
||||
MC_CLIENT.sendChatMessage("\u00A76" + "Distant Horizons: Replay detected." + "\u00A7r"); // gold color
|
||||
MC_CLIENT.sendChatMessage(EMinecraftColor.ORANGE + "Distant Horizons: Replay detected." + EMinecraftColor.CLEAR_FORMATTING);
|
||||
MC_CLIENT.sendChatMessage("DH may behave strangely or have missing functionality.");
|
||||
MC_CLIENT.sendChatMessage("In order to use pre-generated LODs, put your DH database(s) in:");
|
||||
MC_CLIENT.sendChatMessage("\u00A77"+".Minecraft" + File.separator + ClientOnlySaveStructure.SERVER_DATA_FOLDER_NAME + File.separator + ClientOnlySaveStructure.REPLAY_SERVER_FOLDER_NAME + File.separator + "DIMENSION_NAME"+"\u00A7r"); // light gray color
|
||||
MC_CLIENT.sendChatMessage(EMinecraftColor.GRAY +".Minecraft" + File.separator + ClientOnlySaveStructure.SERVER_DATA_FOLDER_NAME + File.separator + ClientOnlySaveStructure.REPLAY_SERVER_FOLDER_NAME + File.separator + "DIMENSION_NAME"+EMinecraftColor.CLEAR_FORMATTING);
|
||||
MC_CLIENT.sendChatMessage("This can be disabled in DH's config under Advanced -> Logging.");
|
||||
MC_CLIENT.sendChatMessage("");
|
||||
}
|
||||
@@ -507,10 +508,10 @@ public class ClientApi
|
||||
this.rendererDisabledBecauseOfExceptions = true;
|
||||
LOGGER.error("Unexpected Renderer error in render pass [" + renderPass + "]. Error: " + e.getMessage(), e);
|
||||
|
||||
MC_CLIENT.sendChatMessage("\u00A74\u00A7l\u00A7uERROR: Distant Horizons renderer has encountered an exception!");
|
||||
MC_CLIENT.sendChatMessage("\u00A74Renderer disabled to try preventing GL state corruption.");
|
||||
MC_CLIENT.sendChatMessage("\u00A74Toggle DH rendering via the config UI to re-activate DH rendering.");
|
||||
MC_CLIENT.sendChatMessage("\u00A74Error: " + e);
|
||||
MC_CLIENT.sendChatMessage(EMinecraftColor.DARK_RED + "" + EMinecraftColor.BOLD + "ERROR: Distant Horizons renderer has encountered an exception!" + EMinecraftColor.CLEAR_FORMATTING);
|
||||
MC_CLIENT.sendChatMessage(EMinecraftColor.DARK_RED + "Renderer disabled to try preventing GL state corruption." + EMinecraftColor.CLEAR_FORMATTING);
|
||||
MC_CLIENT.sendChatMessage(EMinecraftColor.DARK_RED + "Toggle DH rendering via the config UI to re-activate DH rendering." + EMinecraftColor.CLEAR_FORMATTING);
|
||||
MC_CLIENT.sendChatMessage(EMinecraftColor.DARK_RED + "Error: " + EMinecraftColor.CLEAR_FORMATTING + e);
|
||||
}
|
||||
|
||||
|
||||
@@ -655,8 +656,7 @@ public class ClientApi
|
||||
|
||||
// remind the user that this is a development build
|
||||
String message =
|
||||
// green text
|
||||
"\u00A72" + "Distant Horizons: nightly/unstable build, version: [" + ModInfo.VERSION+"]." + "\u00A7r\n" +
|
||||
EMinecraftColor.DARK_GREEN + "Distant Horizons: nightly/unstable build, version: [" + ModInfo.VERSION+"]." +EMinecraftColor.CLEAR_FORMATTING + "\n" +
|
||||
"Issues may occur with this version.\n" +
|
||||
"Here be dragons!\n";
|
||||
MC_CLIENT.sendChatMessage(message);
|
||||
@@ -680,7 +680,7 @@ public class ClientApi
|
||||
{
|
||||
String message =
|
||||
// orange text
|
||||
"\u00A76" + "Distant Horizons: Low memory detected." + "\u00A7r \n" +
|
||||
EMinecraftColor.ORANGE + "Distant Horizons: Low memory detected." + EMinecraftColor.CLEAR_FORMATTING + "\n" +
|
||||
"Stuttering or low FPS may occur. \n" +
|
||||
"Please increase Minecraft's available memory to 4 GB or more. \n" +
|
||||
"This warning can be disabled in DH's config under Advanced -> Logging. \n";
|
||||
@@ -702,15 +702,13 @@ public class ClientApi
|
||||
this.lastStaticWarningMessageSentMsTime = System.currentTimeMillis();
|
||||
|
||||
String message =
|
||||
// yellow text
|
||||
"\u00A7e" + "Distant Horizons: High vanilla render distance detected." + "\u00A7r \n" +
|
||||
"Using a high vanilla render distance uses a lot of CPU power \n" +
|
||||
"and doesn't improve graphics much after about 12.\n" +
|
||||
"Lowing your vanilla render distance will give you better FPS\n" +
|
||||
"and reduce stuttering at a similar visual quality.\n" +
|
||||
// gray text
|
||||
"\u00A77" + "A vanilla render distance of 8 is recommended." + "\u00A7r \n" +
|
||||
"This message can be disabled in DH's config under Advanced -> Logging.\n";
|
||||
EMinecraftColor.YELLOW + "Distant Horizons: High vanilla render distance detected." + EMinecraftColor.CLEAR_FORMATTING + "\n" +
|
||||
"Using a high vanilla render distance uses a lot of CPU power \n" +
|
||||
"and doesn't improve graphics much after about 12.\n" +
|
||||
"Lowing your vanilla render distance will give you better FPS\n" +
|
||||
"and reduce stuttering at a similar visual quality.\n" +
|
||||
EMinecraftColor.GRAY + "A vanilla render distance of 8 is recommended." + EMinecraftColor.CLEAR_FORMATTING + "\n" +
|
||||
"This message can be disabled in DH's config under Advanced -> Logging.\n";
|
||||
MC_CLIENT.sendChatMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -2,6 +2,7 @@ package com.seibel.distanthorizons.core.api.internal.chunkUpdating;
|
||||
|
||||
import com.seibel.distanthorizons.core.api.internal.SharedApi;
|
||||
import com.seibel.distanthorizons.core.pos.DhChunkPos;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -105,6 +106,7 @@ public class ChunkPosQueue
|
||||
this.furthestQueue.remove(closest);
|
||||
return this.updateDataByChunkPos.remove(closest);
|
||||
}
|
||||
@Nullable
|
||||
public ChunkUpdateData popFurthest()
|
||||
{
|
||||
if (this.furthestQueue.isEmpty())
|
||||
|
||||
+6
-2
@@ -5,6 +5,7 @@ import com.google.common.cache.CacheBuilder;
|
||||
import com.seibel.distanthorizons.core.api.internal.ClientApi;
|
||||
import com.seibel.distanthorizons.core.api.internal.SharedApi;
|
||||
import com.seibel.distanthorizons.core.config.Config;
|
||||
import com.seibel.distanthorizons.core.enums.EMinecraftColor;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.multiplayer.client.SyncOnLoadRequestQueue;
|
||||
import com.seibel.distanthorizons.core.pos.DhChunkPos;
|
||||
@@ -94,7 +95,10 @@ public class ChunkUpdateQueueManager
|
||||
if (remainingSlots <= 0)
|
||||
{
|
||||
ChunkUpdateData removedData = queue.popFurthest();
|
||||
this.queuedChunkWrapperByChunkPos.remove(removedData.chunkWrapper.getChunkPos());
|
||||
if (removedData != null)
|
||||
{
|
||||
this.queuedChunkWrapperByChunkPos.remove(removedData.chunkWrapper.getChunkPos());
|
||||
}
|
||||
}
|
||||
|
||||
queue.addItem(pos,updateData);
|
||||
@@ -116,7 +120,7 @@ public class ChunkUpdateQueueManager
|
||||
{
|
||||
lastOverloadedLogMessageMsTime = System.currentTimeMillis();
|
||||
|
||||
String message = "\u00A76" + "Distant Horizons overloaded, too many chunks queued for LOD processing. " + "\u00A7r" +
|
||||
String message = EMinecraftColor.ORANGE + "Distant Horizons overloaded, too many chunks queued for LOD processing. " + EMinecraftColor.CLEAR_FORMATTING +
|
||||
"\nThis may result in holes in your LODs. " +
|
||||
"\nFix: move through the world slower, decrease your vanilla render distance, slow down your world pre-generator (IE Chunky), or increase the Distant Horizons' CPU thread counts. " +
|
||||
"\nMax queue count [" + SharedApi.CHUNK_UPDATE_QUEUE_MANAGER.maxSize + "] ([" + SharedApi.MAX_UPDATING_CHUNK_COUNT_PER_THREAD_AND_PLAYER + "] per thread+players).";
|
||||
|
||||
@@ -1,12 +1,47 @@
|
||||
package com.seibel.distanthorizons.core.enums;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* might be deprecated in the future? in that case we'll probably want a wrapper
|
||||
* function to handle colors for new MC versions
|
||||
*
|
||||
* <br><br>
|
||||
* source: https://minecraft.wiki/w/Formatting_codes
|
||||
*/
|
||||
public class EMinecraftColor
|
||||
public enum EMinecraftColor // TODO EMinecraftTextFormat
|
||||
{
|
||||
BLACK("\u00A70"),
|
||||
DARK_BLUE("\u00A71"),
|
||||
DARK_GREEN("\u00A72"),
|
||||
DARK_AQUA("\u00A73"),
|
||||
DARK_RED("\u00A74"),
|
||||
DARK_PURPLE("\u00A75"),
|
||||
ORANGE("\u00A76"),
|
||||
GRAY("\u00A77"),
|
||||
DARK_GRAY("\u00A78"),
|
||||
BLUE("\u00A79"),
|
||||
GREEN("\u00A7a"),
|
||||
AQUA("\u00A7b"),
|
||||
RED("\u00A7c"),
|
||||
LIGHT_PURPLE("\u00A7d"),
|
||||
YELLOW("\u00A7e"),
|
||||
WHITE("\u00A7f"),
|
||||
|
||||
OBFUSCATED("\u00A7k"),
|
||||
BOLD("\u00A7l"),
|
||||
STRIKETHROUGH("\u00A7m"),
|
||||
UNDERLINE("\u00A7n"),
|
||||
ITALIC("\u00A7o"),
|
||||
CLEAR_FORMATTING("\u00A7r");
|
||||
|
||||
public final String colorCode;
|
||||
|
||||
EMinecraftColor(String colorCode)
|
||||
{
|
||||
this.colorCode = colorCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() { return this.colorCode; }
|
||||
|
||||
}
|
||||
|
||||
+8
-11
@@ -44,6 +44,7 @@ import com.seibel.distanthorizons.core.util.threading.PriorityTaskPicker;
|
||||
import com.seibel.distanthorizons.core.util.threading.ThreadPoolUtil;
|
||||
import it.unimi.dsi.fastutil.bytes.ByteArrayList;
|
||||
import it.unimi.dsi.fastutil.longs.LongArrayList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
@@ -116,26 +117,22 @@ public class GeneratedFullDataSourceProvider extends FullDataSourceProviderV2 im
|
||||
// events //
|
||||
//========//
|
||||
|
||||
private void onWorldGenTaskComplete(DataSourceRetrievalResult genTaskResult, Throwable exception)
|
||||
private void onWorldGenTaskComplete(@NotNull Long genPos, @Nullable DataSourceRetrievalResult genTaskResult, @Nullable Throwable exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (exception != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (genTaskResult.state == ERetrievalResultState.FAIL)
|
||||
{
|
||||
LodUtil.assertTrue(genTaskResult.dataSource == null, "Errored retrieval object should not have a datasource.");
|
||||
|
||||
// don't log shutdown exceptions
|
||||
if (!ExceptionUtil.isInterruptOrReject(exception))
|
||||
{
|
||||
LOGGER.error("Uncaught Gen Task Exception at [" + genTaskResult.pos + "], error: [" + exception.getMessage() + "].", exception);
|
||||
LOGGER.error("Uncaught Gen Task Exception at [" + genPos + "], error: [" + exception.getMessage() + "].", exception);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (genTaskResult.state == ERetrievalResultState.SUCCESS)
|
||||
|
||||
Objects.requireNonNull(genTaskResult);
|
||||
if (genTaskResult.state == ERetrievalResultState.SUCCESS)
|
||||
{
|
||||
LodUtil.assertTrue(genTaskResult.dataSource != null, "Successful retrieval object should have a datasource.");
|
||||
|
||||
@@ -310,7 +307,7 @@ public class GeneratedFullDataSourceProvider extends FullDataSourceProviderV2 im
|
||||
}
|
||||
|
||||
CompletableFuture<DataSourceRetrievalResult> worldGenFuture = worldGenQueue.submitRetrievalTask(genPos, (byte) (DhSectionPos.getDetailLevel(genPos) - DhSectionPos.SECTION_MINIMUM_DETAIL_LEVEL));
|
||||
worldGenFuture.whenComplete(this::onWorldGenTaskComplete);
|
||||
worldGenFuture.whenComplete((r, e) -> this.onWorldGenTaskComplete(genPos, r, e));
|
||||
|
||||
return worldGenFuture;
|
||||
}
|
||||
|
||||
@@ -157,9 +157,9 @@ public class PregenManager
|
||||
else
|
||||
{
|
||||
this.fullDataSourceProvider.queuePositionForRetrieval(fullDataSource.getPos())
|
||||
.thenAccept((DataSourceRetrievalResult result) ->
|
||||
.whenComplete((DataSourceRetrievalResult result, Throwable throwable) ->
|
||||
{
|
||||
if (result.state == ERetrievalResultState.FAIL)
|
||||
if (throwable != null)
|
||||
{
|
||||
LOGGER.warn("Failed to generate section " + DhSectionPos.toString(result.pos));
|
||||
}
|
||||
|
||||
+5
-3
@@ -92,7 +92,7 @@ public class WorldGenerationQueue implements IFullDataSourceRetrievalQueue, IDeb
|
||||
private int estimatedRemainingChunkCount = 0;
|
||||
|
||||
private final RollingAverage rollingAverageChunkGenTimeInMs = new RollingAverage(Runtime.getRuntime().availableProcessors() * 500);
|
||||
public RollingAverage getRollingAverageChunkGenTimeInMs() { return this.rollingAverageChunkGenTimeInMs; }
|
||||
@Override public RollingAverage getRollingAverageChunkGenTimeInMs() { return this.rollingAverageChunkGenTimeInMs; }
|
||||
|
||||
|
||||
|
||||
@@ -128,7 +128,9 @@ public class WorldGenerationQueue implements IFullDataSourceRetrievalQueue, IDeb
|
||||
// the generator is shutting down, don't add new tasks
|
||||
if (this.generatorClosingFuture != null)
|
||||
{
|
||||
return CompletableFuture.completedFuture(DataSourceRetrievalResult.CreateFail());
|
||||
CompletableFuture<DataSourceRetrievalResult> f = new CompletableFuture<>();
|
||||
f.completeExceptionally(new CancellationException());
|
||||
return f;
|
||||
}
|
||||
|
||||
// use the existing task if present
|
||||
@@ -362,7 +364,7 @@ public class WorldGenerationQueue implements IFullDataSourceRetrievalQueue, IDeb
|
||||
}
|
||||
|
||||
LodUtil.assertTrue(fullDataSource == null);
|
||||
worldGenTask.future.complete(DataSourceRetrievalResult.CreateFail());
|
||||
worldGenTask.future.completeExceptionally(exception);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
-1
@@ -40,7 +40,6 @@ public class DataSourceRetrievalResult
|
||||
//==============//
|
||||
|
||||
public static DataSourceRetrievalResult CreateSplit() { return new DataSourceRetrievalResult(ERetrievalResultState.REQUIRES_SPLITTING, 0, null); }
|
||||
public static DataSourceRetrievalResult CreateFail() { return new DataSourceRetrievalResult(ERetrievalResultState.FAIL, 0, null); }
|
||||
public static DataSourceRetrievalResult CreateSuccess(long pos, FullDataSourceV2 generatedDataSource) { return new DataSourceRetrievalResult(ERetrievalResultState.SUCCESS, pos, generatedDataSource); }
|
||||
private DataSourceRetrievalResult(ERetrievalResultState state, long pos, @Nullable FullDataSourceV2 dataSource)
|
||||
{
|
||||
|
||||
-2
@@ -3,7 +3,6 @@ package com.seibel.distanthorizons.core.generation.tasks;
|
||||
/**
|
||||
* SUCCESS <br>
|
||||
* REQUIRES_SPLITTING <br>
|
||||
* FAIL <br>
|
||||
*
|
||||
* @see DataSourceRetrievalResult
|
||||
*/
|
||||
@@ -11,5 +10,4 @@ public enum ERetrievalResultState
|
||||
{
|
||||
SUCCESS,
|
||||
REQUIRES_SPLITTING,
|
||||
FAIL,
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.seibel.distanthorizons.core.config.Config;
|
||||
import com.seibel.distanthorizons.core.config.listeners.IConfigListener;
|
||||
import com.seibel.distanthorizons.core.config.types.ConfigEntry;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.core.enums.EMinecraftColor;
|
||||
import com.seibel.distanthorizons.core.util.ThreadUtil;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
|
||||
import com.seibel.distanthorizons.coreapi.ModInfo;
|
||||
@@ -302,32 +303,32 @@ public class DhLogger implements IConfigListener
|
||||
String prefix = "[" + ModInfo.READABLE_NAME + "] ";
|
||||
if (logLevel == Level.ERROR)
|
||||
{
|
||||
prefix += "\u00A74";
|
||||
prefix += EMinecraftColor.DARK_RED;
|
||||
}
|
||||
else if (logLevel == Level.WARN)
|
||||
{
|
||||
prefix += "\u00A76";
|
||||
prefix += EMinecraftColor.ORANGE;
|
||||
}
|
||||
else if (logLevel == Level.INFO)
|
||||
{
|
||||
prefix += "\u00A7f";
|
||||
prefix += EMinecraftColor.AQUA;
|
||||
}
|
||||
else if (logLevel == Level.DEBUG)
|
||||
{
|
||||
prefix += "\u00A77";
|
||||
prefix += EMinecraftColor.GREEN;
|
||||
}
|
||||
else if (logLevel == Level.TRACE)
|
||||
{
|
||||
prefix += "\u00A78";
|
||||
prefix += EMinecraftColor.DARK_GRAY;
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix += "\u00A7f";
|
||||
prefix += EMinecraftColor.WHITE;
|
||||
}
|
||||
|
||||
prefix += "\u00A7l\u00A7u";
|
||||
prefix += EMinecraftColor.BOLD + "" + EMinecraftColor.WHITE;
|
||||
prefix += logLevel.name();
|
||||
prefix += ":\u00A7r ";
|
||||
prefix += EMinecraftColor.CLEAR_FORMATTING + " ";
|
||||
|
||||
mc_client.sendChatMessage(prefix + message);
|
||||
}
|
||||
|
||||
+2
-5
@@ -139,9 +139,6 @@ public abstract class AbstractFullDataNetworkRequestQueue implements IDebugRende
|
||||
break;
|
||||
case REQUIRES_SPLITTING:
|
||||
break;
|
||||
case FAIL:
|
||||
this.failedRequests.incrementAndGet();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -269,7 +266,7 @@ public abstract class AbstractFullDataNetworkRequestQueue implements IDebugRende
|
||||
catch (RequestRejectedException e)
|
||||
{
|
||||
LOGGER.info("Request rejected by the server, message: [" + e.getMessage() + "].");
|
||||
requestTask.future.complete(DataSourceRetrievalResult.CreateFail());
|
||||
requestTask.future.completeExceptionally(e);
|
||||
}
|
||||
catch (RateLimitedException e)
|
||||
{
|
||||
@@ -298,7 +295,7 @@ public abstract class AbstractFullDataNetworkRequestQueue implements IDebugRende
|
||||
}
|
||||
else
|
||||
{
|
||||
requestTask.future.complete(DataSourceRetrievalResult.CreateFail());
|
||||
requestTask.future.completeExceptionally(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,6 +2,7 @@ package com.seibel.distanthorizons.core.pooling;
|
||||
|
||||
import com.seibel.distanthorizons.core.api.internal.ClientApi;
|
||||
import com.seibel.distanthorizons.core.config.Config;
|
||||
import com.seibel.distanthorizons.core.enums.EMinecraftColor;
|
||||
import com.seibel.distanthorizons.core.logging.DhLogger;
|
||||
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.distanthorizons.core.logging.f3.F3Screen;
|
||||
@@ -178,8 +179,7 @@ public class PhantomArrayListPool
|
||||
{
|
||||
lowMemoryWarningLogged = true;
|
||||
|
||||
// orange text
|
||||
String message = "\u00A76" + "Distant Horizons: Insufficient memory detected." + "\u00A7r \n" +
|
||||
String message = EMinecraftColor.ORANGE + "Distant Horizons: Insufficient memory detected." + EMinecraftColor.CLEAR_FORMATTING + "\n" +
|
||||
"This may cause stuttering or crashing. \n" +
|
||||
"Potential causes: \n" +
|
||||
"1. your allocated memory isn't high enough \n" +
|
||||
|
||||
@@ -622,12 +622,7 @@ public class LodQuadTree extends QuadTree<LodRenderSection> implements IDebugRen
|
||||
// task finished
|
||||
this.queuedGenerationPosSet.remove(missingPos);
|
||||
|
||||
// if the task failed re-queue so we can try again
|
||||
if (result.state == ERetrievalResultState.FAIL)
|
||||
{
|
||||
this.missingGenerationPosSet.add(missingPos);
|
||||
}
|
||||
else if (result.state == ERetrievalResultState.REQUIRES_SPLITTING)
|
||||
if (result.state == ERetrievalResultState.REQUIRES_SPLITTING)
|
||||
{
|
||||
DhSectionPos.forEachChild(missingPos, (long childPos) ->
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
package com.seibel.distanthorizons.core.world;
|
||||
|
||||
import com.seibel.distanthorizons.core.api.internal.ClientApi;
|
||||
import com.seibel.distanthorizons.core.enums.EMinecraftColor;
|
||||
import com.seibel.distanthorizons.core.level.DhClientServerLevel;
|
||||
import com.seibel.distanthorizons.core.util.TimerUtil;
|
||||
import com.seibel.distanthorizons.core.util.LodUtil;
|
||||
@@ -82,7 +83,7 @@ public class DhClientServerWorld extends AbstractDhServerWorld<DhClientServerLev
|
||||
LOGGER.fatal("Failed to load client-server level, error: ["+e.getMessage()+"].", e);
|
||||
|
||||
ClientApi.INSTANCE.showChatMessageNextFrame(// red text
|
||||
"\u00A7c" + "Distant Horizons: ClientServer level loading failed." + "\u00A7r \n" +
|
||||
EMinecraftColor.RED + "Distant Horizons: ClientServer level loading failed." + EMinecraftColor.CLEAR_FORMATTING + "\n" +
|
||||
"Unable to load level ["+levelWrapper.getDhIdentifier()+"], LODs may not appear. See log for more information.");
|
||||
|
||||
return null;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
package com.seibel.distanthorizons.core.world;
|
||||
|
||||
import com.seibel.distanthorizons.core.api.internal.ClientApi;
|
||||
import com.seibel.distanthorizons.core.enums.EMinecraftColor;
|
||||
import com.seibel.distanthorizons.core.file.structure.ClientOnlySaveStructure;
|
||||
import com.seibel.distanthorizons.core.level.DhClientLevel;
|
||||
import com.seibel.distanthorizons.core.level.IDhLevel;
|
||||
@@ -94,9 +95,9 @@ public class DhClientWorld extends AbstractDhWorld implements IDhClientWorld
|
||||
{
|
||||
LOGGER.fatal("Failed to load client level, error: ["+e.getMessage()+"].", e);
|
||||
|
||||
ClientApi.INSTANCE.showChatMessageNextFrame(// red text
|
||||
"\u00A7c" + "Distant Horizons: Client level loading failed." + "\u00A7r \n" +
|
||||
"Unable to load level ["+clientLevelWrapper.getDhIdentifier()+"], LODs may not appear. See log for more information.");
|
||||
ClientApi.INSTANCE.showChatMessageNextFrame(
|
||||
EMinecraftColor.RED + "Distant Horizons: Client level loading failed." + EMinecraftColor.CLEAR_FORMATTING + "\n" +
|
||||
"Unable to load level ["+clientLevelWrapper.getDhIdentifier()+"], LODs may not appear. See log for more information.");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
package com.seibel.distanthorizons.core.world;
|
||||
|
||||
import com.seibel.distanthorizons.core.api.internal.ClientApi;
|
||||
import com.seibel.distanthorizons.core.enums.EMinecraftColor;
|
||||
import com.seibel.distanthorizons.core.level.DhServerLevel;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.world.ILevelWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.world.IServerLevelWrapper;
|
||||
@@ -62,9 +63,9 @@ public class DhServerWorld extends AbstractDhServerWorld<DhServerLevel>
|
||||
{
|
||||
LOGGER.fatal("Failed to load server level, error: ["+e.getMessage()+"].", e);
|
||||
|
||||
ClientApi.INSTANCE.showChatMessageNextFrame(// red text
|
||||
"\u00A7c" + "Distant Horizons: Server level loading failed." + "\u00A7r \n" +
|
||||
"Unable to load level ["+serverLevelWrapper.getDhIdentifier()+"], LODs may not appear. See log for more information.");
|
||||
ClientApi.INSTANCE.showChatMessageNextFrame(
|
||||
EMinecraftColor.RED + "Distant Horizons: Server level loading failed." + EMinecraftColor.CLEAR_FORMATTING + "\n" +
|
||||
"Unable to load level ["+serverLevelWrapper.getDhIdentifier()+"], LODs may not appear. See log for more information.");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user