Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9cb627eaac |
@@ -171,9 +171,11 @@ public class Config
|
||||
public static class Quality
|
||||
{
|
||||
public static ConfigEntry<Integer> lodChunkRenderDistanceRadius = new ConfigEntry.Builder<Integer>()
|
||||
.setChatCommandName("generation.maxRequestDistance")
|
||||
.setMinDefaultMax(32, 256, 4096)
|
||||
.comment("" +
|
||||
"The radius of the mod's render distance. (measured in chunks)\n" +
|
||||
"On server defines the distance allowed to generate around the player; note that real-time updates and synd on load limits are defined separately. \n" +
|
||||
"")
|
||||
.setPerformance(EConfigEntryPerformance.HIGH)
|
||||
.build();
|
||||
@@ -1620,15 +1622,6 @@ public class Config
|
||||
+ "")
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> maxGenerationRequestDistance = new ConfigEntry.Builder<Integer>()
|
||||
.setChatCommandName("generation.maxRequestDistance")
|
||||
.setMinDefaultMax(256, 4096, 4096)
|
||||
.comment("" +
|
||||
"Defines the distance allowed to generate around the player." +
|
||||
"")
|
||||
.setPerformance(EConfigEntryPerformance.HIGH)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Integer> generationBoundsX = new ConfigEntry.Builder<Integer>()
|
||||
.setChatCommandName("generation.bounds.x")
|
||||
.setAppearance(EConfigEntryAppearance.ONLY_IN_FILE)
|
||||
|
||||
@@ -143,9 +143,9 @@ public abstract class AbstractDhServerLevel extends AbstractDhLevel implements I
|
||||
|
||||
if (message.clientTimestamp == null)
|
||||
{
|
||||
if (distanceFromPlayer > Config.Server.maxGenerationRequestDistance.get())
|
||||
if (distanceFromPlayer > Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistanceRadius.get())
|
||||
{
|
||||
message.sendResponse(new RequestOutOfRangeException("Distance too large: " + distanceFromPlayer + " > " + Config.Server.maxGenerationRequestDistance.get()));
|
||||
message.sendResponse(new RequestOutOfRangeException("Distance too large: " + distanceFromPlayer + " > " + Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistanceRadius.get()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ public class SessionConfig implements INetworkObject
|
||||
// Note: config values are transmitted in the insertion order
|
||||
|
||||
registerConfigEntry(Config.Common.WorldGenerator.enableDistantGeneration, Boolean::logicalAnd);
|
||||
registerConfigEntry(Config.Server.maxGenerationRequestDistance, Math::min);
|
||||
registerConfigEntry(Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistanceRadius, Math::min);
|
||||
registerConfigEntry(Config.Server.generationBoundsX, (x, y) -> y);
|
||||
registerConfigEntry(Config.Server.generationBoundsZ, (x, y) -> y);
|
||||
registerConfigEntry(Config.Server.generationBoundsRadius, (x, y) -> y);
|
||||
@@ -67,7 +67,7 @@ public class SessionConfig implements INetworkObject
|
||||
//===============//
|
||||
|
||||
public boolean isDistantGenerationEnabled() { return this.getValue(Config.Common.WorldGenerator.enableDistantGeneration); }
|
||||
public int getMaxGenerationRequestDistance() { return this.getValue(Config.Server.maxGenerationRequestDistance); }
|
||||
public int getMaxGenerationRequestDistance() { return this.getValue(Config.Client.Advanced.Graphics.Quality.lodChunkRenderDistanceRadius); }
|
||||
public Integer getGenerationBoundsX() { return this.getValue(Config.Server.generationBoundsX); }
|
||||
public Integer getGenerationBoundsZ() { return this.getValue(Config.Server.generationBoundsZ); }
|
||||
public Integer getGenerationBoundsRadius() { return this.getValue(Config.Server.generationBoundsRadius); }
|
||||
|
||||
Reference in New Issue
Block a user