diff --git a/common/src/main/java/com/seibel/distanthorizons/common/AbstractModInitializer.java b/common/src/main/java/com/seibel/distanthorizons/common/AbstractModInitializer.java index 3e6b4bf9c..4ec8fbd0f 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/AbstractModInitializer.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/AbstractModInitializer.java @@ -234,37 +234,38 @@ public abstract class AbstractModInitializer LOGGER.warn(startingString + "[WWOO] "+ wwooWarning); } - // Chunky - boolean chunkyPresent = false; - try - { - Class.forName("org.popcraft.chunky.api.ChunkyAPI"); - chunkyPresent = true; - } - catch (ClassNotFoundException ignore) { } - if (chunkyPresent) + // if chunky is active we need to run chunk update synchronously to prevent holes if DH gets overwhelmed + SharedApi.runChunkUpdatesAsync = !modChecker.isModLoaded("chunky"); + if (SharedApi.runChunkUpdatesAsync) { - // Chunky can generate chunks faster than DH can process them, - // causing holes in the LODs. - // Generally it's better and faster to use DH's world generator. - - String chunkyWarning = "Chunky can cause DH LODs to have holes " + - "since Chunky can generate chunks faster than DH can process them. \n" + - "Using DH's distant generator instead of chunky or increasing DH's CPU thread count can resolve the issue."; - - if (showChatWarnings) - { - String message = - // orange text - "\u00A76" + "Distant Horizons: Chunky detected." + "\u00A7r\n" + - chunkyWarning; - ClientApi.INSTANCE.showChatMessageNextFrame(message); - } - - LOGGER.warn(startingString + "[Chunky] "+ chunkyWarning); + LOGGER.info("Chunky detected. DH will run chunk updates on the server thread. This will prevent data loss or holes but may cause stuttering."); } + //// Chunky + //boolean chunkyPresent = modChecker.isModLoaded("chunky"); + //if (chunkyPresent) + //{ + // // Chunky can generate chunks faster than DH can process them, + // // causing holes in the LODs. + // // Generally it's better and faster to use DH's world generator. + // + // String chunkyWarning = "Chunky can cause DH LODs to have holes " + + // "since Chunky can generate chunks faster than DH can process them. \n" + + // "Using DH's distant generator instead of chunky or increasing DH's CPU thread count can resolve the issue."; + // + // if (showChatWarnings) + // { + // String message = + // // orange text + // "\u00A76" + "Distant Horizons: Chunky detected." + "\u00A7r\n" + + // chunkyWarning; + // ClientApi.INSTANCE.showChatMessageNextFrame(message); + // } + // + // LOGGER.warn(startingString + "[Chunky] "+ chunkyWarning); + //} + } diff --git a/coreSubProjects b/coreSubProjects index 49da0e09a..d398b3bc0 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 49da0e09a4c149d2c2749361c35ac9473682e372 +Subproject commit d398b3bc04c0275a58cf121fe90a265ee0e4b592