Fix config descriptions & clean up

This commit is contained in:
s809
2024-11-22 13:29:06 +05:00
parent 36b719c361
commit 0f2e007eff
4 changed files with 44 additions and 46 deletions
@@ -1546,15 +1546,9 @@ public class Config
public static ConfigEntry<Integer> maxGenerationRequestDistance = new ConfigEntry.Builder<Integer>()
.setServersideShortName("maxGenerationRequestDistance")
.setMinDefaultMax(32, 1024, 4096)
.setMinDefaultMax(256, 4096, 4096)
.comment("" +
"Defines the distance players will receive real-time updates for if enabled. \n" +
"\n" +
"Note: \n" +
"This setting does not prevent players from generating farther out. \n" +
"If you want to limit performance impact, change rate limits \n" +
"and thread count/runtime ratio settings instead. \n" +
"It also does not affect the visuals on clients. \n" +
"Defines the distance allowed to generate around the player." +
"")
.setPerformance(EConfigEntryPerformance.HIGH)
.build();
@@ -1573,13 +1567,7 @@ public class Config
.setServersideShortName("realTimeUpdateDistanceRadius")
.setMinDefaultMax(32, 256, 4096)
.comment("" +
"Defines the distance players will receive real-time updates for if enabled. \n" +
"\n" +
"Note: \n" +
"This setting does not prevent players from generating farther out. \n" +
"If you want to limit performance impact, change rate limits \n" +
"and thread count/runtime ratio settings instead. \n" +
"It also does not affect the visuals on clients. \n" +
"Defines the distance the player will receive updates around." +
"")
.setPerformance(EConfigEntryPerformance.HIGH)
.build();
@@ -1605,15 +1593,10 @@ public class Config
public static ConfigEntry<Integer> maxSyncOnLoadRequestDistance = new ConfigEntry.Builder<Integer>()
.setServersideShortName("maxSyncOnLoadRequestDistance")
.setMinDefaultMax(32, 1024, 4096)
.setMinDefaultMax(256, 4096, 4096)
.comment("" +
"Defines the distance players will receive real-time updates for if enabled. \n" +
"\n" +
"Note: \n" +
"This setting does not prevent players from generating farther out. \n" +
"If you want to limit performance impact, change rate limits \n" +
"and thread count/runtime ratio settings instead. \n" +
"It also does not affect the visuals on clients. \n" +
"Defines the distance allowed to be synchronized around the player. \n" +
"Should be the same or larger than maxGenerationRequestDistance in most cases." +
"")
.setPerformance(EConfigEntryPerformance.HIGH)
.build();
@@ -253,8 +253,6 @@ public abstract class AbstractDhServerLevel extends AbstractDhLevel implements I
}
private void queueLodSyncForRequestMessage(ServerPlayerState serverPlayerState, FullDataSourceRequestMessage message, ServerPlayerState.RateLimiterSet rateLimiterSet)
{
if (!serverPlayerState.sessionConfig.getSynchronizeOnLoad())
{
message.sendResponse(new RequestRejectedException("Operation is disabled in config."));
@@ -71,8 +71,6 @@ public abstract class AbstractFullDataNetworkRequestQueue implements IDebugRende
private final SupplierBasedRateLimiter<Void> rateLimiter = new SupplierBasedRateLimiter<>(this::getRequestRateLimit);
private DhBlockPos2D lastTargetPos = new DhBlockPos2D(0, 0);
//=============//
@@ -146,8 +144,6 @@ public abstract class AbstractFullDataNetworkRequestQueue implements IDebugRende
return false;
}
this.lastTargetPos = targetPos;
// queue requests until the queue is full
while (this.getInProgressTaskCount() < this.getWaitingTaskCount()
&& this.getInProgressTaskCount() < this.getRequestRateLimit()
@@ -376,7 +372,7 @@ public abstract class AbstractFullDataNetworkRequestQueue implements IDebugRende
{
renderer.renderBox(new DebugRenderer.Box(mapEntry.getKey(), -32f, 64f, 0.05f,
mapEntry.getValue().networkDataSourceFuture != null ? Color.red
: DhSectionPos.getChebyshevSignedBlockDistance(mapEntry.getKey(), this.lastTargetPos) <= this.getMaxRequestDistance() * 16 ? Color.gray
: DhSectionPos.getChebyshevSignedBlockDistance(mapEntry.getKey(), Objects.requireNonNull(this.level.getTargetPosForGeneration())) <= this.getMaxRequestDistance() * 16 ? Color.gray
: Color.darkGray
));
}
@@ -669,34 +669,55 @@
"Server",
"distanthorizons.config.server.realTimeUpdateDistanceRadiusInChunks":
"Realtime update Radius In Chunks",
"distanthorizons.config.server.realTimeUpdateDistanceRadiusInChunks.@tooltip":
"Defines the how far away players will receive real-time updates for if enabled.",
"distanthorizons.config.server.sendLevelKeys":
"Send Level Keys",
"distanthorizons.config.server.sendLevelKeys.@tooltip":
"Makes the server send level keys for each world.\nDisable this if you use alternative ways to send level keys.",
"distanthorizons.config.server.levelKeyPrefix":
"Level Key Prefix",
"Level Key Prefix",
"distanthorizons.config.server.levelKeyPrefix.@tooltip":
"Prefix of the level keys sent to the clients.",
"Prefix of the level keys sent to the clients.\nIf the mod is running behind a proxy, each backend should use a unique value.\nIf this value is empty, level key will be based on the server's seed hash.",
"distanthorizons.config.server.generationRequestRateLimit":
"Rate Limit for Generation Requests",
"Rate Limit for Generation Requests",
"distanthorizons.config.server.generationRequestRateLimit.@tooltip":
"How many LOD generation requests per second should a client send? \nAlso limits the amount of player's requests allowed to stay in the server's queue.",
"How many LOD generation requests per second should a client send?\nAlso limits the number of client requests allowed to stay in the server's queue.",
"distanthorizons.config.server.maxGenerationRequestDistance":
"Max Generation Request Distance",
"distanthorizons.config.server.maxGenerationRequestDistance.@tooltip":
"Defines the distance allowed to generate around the player.",
"distanthorizons.config.server.enableRealTimeUpdates":
"Enable Real-time Updates",
"Enable Real-time Updates",
"distanthorizons.config.server.enableRealTimeUpdates.@tooltip":
"If true, clients will receive real-time LOD updates for chunks outside the client's render distance.",
"If true, clients will receive real-time LOD updates for chunks outside the client's render distance.",
"distanthorizons.config.server.realTimeUpdateDistanceRadiusInChunks":
"Real-time Update Radius in Chunks",
"distanthorizons.config.server.realTimeUpdateDistanceRadiusInChunks.@tooltip":
"Defines the distance the player will receive updates around.",
"distanthorizons.config.server.synchronizeOnLoad":
"Synchronize LODs on Load",
"Synchronize LODs on Load",
"distanthorizons.config.server.synchronizeOnLoad.@tooltip":
"If true, clients will receive updated LODs on join if any changes occurred since last join.",
"If true, clients will receive updated LODs when joining or loading new LODs.",
"distanthorizons.config.server.syncOnLoadRateLimit":
"Rate Limit for Sync on Load",
"Rate Limit for Sync on Load",
"distanthorizons.config.server.syncOnLoadRateLimit.@tooltip":
"How many LOD sync requests per second should a client send? \nAlso limits the amount of player's requests allowed to stay in the server's queue.",
"How many LOD sync requests per second should a client send?\nAlso limits the number of client's requests allowed to stay in the server's queue.",
"distanthorizons.config.server.maxSyncOnLoadRequestDistance":
"Max Sync on Load Request Distance",
"distanthorizons.config.server.maxSyncOnLoadRequestDistance.@tooltip":
"Defines the distance allowed to be synchronized around the player.\nShould be the same or larger than maxGenerationRequestDistance in most cases.",
"distanthorizons.config.server.maxDataTransferSpeed":
"Maximum Data Transfer Speed, KB/s",
"Maximum Data Transfer Speed, KB/s",
"distanthorizons.config.server.maxDataTransferSpeed.@tooltip":
"Maximum speed for uploading LODs to the clients, in KB/s.\nValue of 0 disables the limit.",
"Maximum speed for uploading LODs to the clients, in KB/s.\nValue of 0 disables the limit.",