Put N-sized generation and upsampling behind experimental configs

This commit is contained in:
James Seibel
2025-02-11 07:47:24 -06:00
parent 08f63470a5
commit 84015e4a40
5 changed files with 79 additions and 25 deletions
@@ -708,16 +708,15 @@ public class Config
public static ConfigEntry<Boolean> enableCaveCulling = new ConfigEntry.Builder<Boolean>()
.set(true)
.setPerformance(EConfigEntryPerformance.HIGH)
.comment(""
+ "If enabled caves will be culled \n"
+ "If enabled caves won't be rendered. \n"
+ "\n"
+ "NOTE: This feature is under development and \n"
+ " it is VERY experimental! Please don't report \n"
+ " any issues related to this feature. \n"
+ "\n"
+ "Additional Info: Currently this cull all faces \n"
+ " with skylight value of 0 in dimensions that \n"
+ " does not have a ceiling.")
+ " Note: for some world types this can cause \n"
+ " overhangs or walls for floating objects. \n"
+ " Tweaking the caveCullingHeight, can resolve some \n"
+ " of those issues. \n"
+ "")
.addListener(ReloadLodsConfigEventHandler.INSTANCE)
.build();
@@ -1403,6 +1402,30 @@ public class Config
+ "")
.build();
public static ConfigCategory experimental = new ConfigCategory.Builder().set(Experimental.class).build();
public static class Experimental
{
public static ConfigEntry<Boolean> upsampleLowerDetailLodsToFillHoles = new ConfigEntry.Builder<Boolean>()
.set(false)
.comment(""
+ "When active DH will attempt to fill missing LOD data \n"
+ "with any data that is present in the tree, preventing holes when moving \n"
+ "when a N-sized generator (or server) is active. \n"
+ "\n"
+ "This is only used when N-sized world generation is available \n"
+ "and/or when on a server where [generateOnlyInHighestDetail] is false. \n"
+ "\n"
+ "Experimental:\n"
+ "Enabling this option will increase CPU and harddrive use\n"
+ "and may cause rendering bugs.\n"
+ "\n"
+ "")
.build();
}
}
public static class MultiThreading
@@ -1586,15 +1609,6 @@ public class Config
.setPerformance(EConfigEntryPerformance.HIGH)
.build();
public static ConfigEntry<Boolean> generateOnlyInHighestDetail = new ConfigEntry.Builder<Boolean>()
.setChatCommandName("generation.highestDetailOnly")
.set(false)
.comment(""
+ "Makes the server reject all generation requests for detail levels below the highest one.\n"
+ "When enabled on the client, makes it only request highest detail LODs.\n"
+ "")
.build();
public static ConfigEntry<Integer> generationBoundsX = new ConfigEntry.Builder<Integer>()
.setChatCommandName("generation.bounds.x")
.setAppearance(EConfigEntryAppearance.ONLY_IN_FILE)
@@ -1680,6 +1694,28 @@ public class Config
+ "")
.build();
public static ConfigCategory experimental = new ConfigCategory.Builder().set(Experimental.class).build();
public static class Experimental
{
public static ConfigEntry<Boolean> generateOnlyInHighestDetail = new ConfigEntry.Builder<Boolean>()
.setChatCommandName("generation.highestDetailOnly")
.set(true)
.comment(""
+ "Makes the server reject all generation requests for detail levels below the highest one.\n"
+ "When enabled on the client, makes it only request highest detail LODs.\n"
+ "\n"
+ "Experimental:\n"
+ "Enabling this option may cause holes in the LODs when moving or teleporting.\n"
+ "Also enabling the [upsampleLowerDetailLodsToFillHoles] option may\n"
+ "reduce that problem at the cost of increased hard drive use. \n"
+ "\n"
+ "")
.build();
}
}
@@ -226,7 +226,11 @@ public class FullDataSourceProviderV2
}
this.runParentUpdates(executor, targetBlockPos);
this.runChildUpdates(executor, targetBlockPos);
if (Config.Common.LodBuilding.Experimental.upsampleLowerDetailLodsToFillHoles.get())
{
this.runChildUpdates(executor, targetBlockPos);
}
}
catch (InterruptedException ignored)
@@ -50,7 +50,7 @@ public class RemoteWorldRetrievalQueue extends AbstractFullDataNetworkRequestQue
@Override
public byte lowestDataDetail()
{
return Config.Server.generateOnlyInHighestDetail.get()
return Config.Server.Experimental.generateOnlyInHighestDetail.get()
? LodUtil.BLOCK_DETAIL_LEVEL
: LodUtil.BLOCK_DETAIL_LEVEL + 12;
} // TODO should be the same as what the server's update propagator can provide
@@ -162,7 +162,7 @@ public abstract class AbstractDhServerLevel extends AbstractDhLevel implements I
}
}
if (Config.Server.generateOnlyInHighestDetail.get() && DhSectionPos.getDetailLevel(message.sectionPos) != DhSectionPos.SECTION_MINIMUM_DETAIL_LEVEL)
if (Config.Server.Experimental.generateOnlyInHighestDetail.get() && DhSectionPos.getDetailLevel(message.sectionPos) != DhSectionPos.SECTION_MINIMUM_DETAIL_LEVEL)
{
message.sendResponse(new SectionRequiresSplittingException("Only highest-detail sections are allowed"));
return;
@@ -626,6 +626,16 @@
"distanthorizons.config.common.lodBuilding.showMigrationChatWarning":
"Log Migration In Chat",
"distanthorizons.config.common.lodBuilding.experimental":
"Experimental",
"distanthorizons.config.common.lodBuilding.experimental.upsampleLowerDetailLodsToFillHoles":
"Upsample Lower Detail LODs To Fill Holes",
"distanthorizons.config.common.lodBuilding.experimental.upsampleLowerDetailLodsToFillHoles.@tooltip":
"When active DH will attempt to fill missing LOD data \nwith any data that is present in the tree, preventing holes when moving \nwhen a N-sized generator (or server) is active. \n\n§6EXPERIMENTAL§r Will increase harddrive use and may cause rendering issues. \nSee the config file for more details.",
"distanthorizons.config.common.multiThreading":
@@ -703,11 +713,6 @@
"distanthorizons.config.server.maxGenerationRequestDistance.@tooltip":
"Defines the distance allowed to generate around the player.",
"distanthorizons.config.server.generateOnlyInHighestDetail":
"Generate Only in Highest Detail",
"distanthorizons.config.server.generateOnlyInHighestDetail.@tooltip":
"Makes the server reject all generation requests for detail levels below the highest one.\nWhen enabled on the client, makes it only request highest detail LODs.",
"distanthorizons.config.server.enableRealTimeUpdates":
"Enable Real-time Updates",
"distanthorizons.config.server.enableRealTimeUpdates.@tooltip":
@@ -739,6 +744,15 @@
"Maximum speed for uploading LODs to the clients, in KB/s.\nValue of 0 disables the limit.",
"distanthorizons.config.server.experimental":
"Experimental",
"distanthorizons.config.server.experimental.generateOnlyInHighestDetail":
"Generate Only in Highest Detail",
"distanthorizons.config.server.experimental.generateOnlyInHighestDetail.@tooltip":
"Makes the server reject all generation requests for detail levels below the highest one.\nWhen enabled on the client, makes it only request highest detail LODs. \n\n§6EXPERIMENTAL§r May cause holes and other rendering issues. \nSee the config file for more details.",