diff --git a/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java b/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java index 32b60160d..5d058e0a7 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/config/Config.java @@ -708,16 +708,15 @@ public class Config public static ConfigEntry enableCaveCulling = new ConfigEntry.Builder() .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 upsampleLowerDetailLodsToFillHoles = new ConfigEntry.Builder() + .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 generateOnlyInHighestDetail = new ConfigEntry.Builder() - .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 generationBoundsX = new ConfigEntry.Builder() .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 generateOnlyInHighestDetail = new ConfigEntry.Builder() + .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(); + } + } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/file/fullDatafile/FullDataSourceProviderV2.java b/core/src/main/java/com/seibel/distanthorizons/core/file/fullDatafile/FullDataSourceProviderV2.java index 7f7d8e988..289753940 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/file/fullDatafile/FullDataSourceProviderV2.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/file/fullDatafile/FullDataSourceProviderV2.java @@ -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) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/generation/RemoteWorldRetrievalQueue.java b/core/src/main/java/com/seibel/distanthorizons/core/generation/RemoteWorldRetrievalQueue.java index 2a4316bac..b82a87381 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/generation/RemoteWorldRetrievalQueue.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/generation/RemoteWorldRetrievalQueue.java @@ -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 diff --git a/core/src/main/java/com/seibel/distanthorizons/core/level/AbstractDhServerLevel.java b/core/src/main/java/com/seibel/distanthorizons/core/level/AbstractDhServerLevel.java index f7bedcc62..ef920bc52 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/level/AbstractDhServerLevel.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/level/AbstractDhServerLevel.java @@ -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; diff --git a/core/src/main/resources/assets/distanthorizons/lang/en_us.json b/core/src/main/resources/assets/distanthorizons/lang/en_us.json index a801191bf..919029e95 100644 --- a/core/src/main/resources/assets/distanthorizons/lang/en_us.json +++ b/core/src/main/resources/assets/distanthorizons/lang/en_us.json @@ -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.", + +