Make async chunk loading a config option (#4544)

This commit is contained in:
Ben Staddon authored and LexManos committed 2018-01-18 12:44:14 -08:00
1 parent 3a3883589f
commit 6962678804
4 files changed
+26 -13

No files matched your search

@@ -113,6 +113,8 @@ public class ForgeChunkManager
private static int playerTicketLength;
private static int dormantChunkCacheSize;
public static boolean asyncChunkLoading;
public static final List<String> MOD_PROP_ORDER = new ArrayList<String>(2);
private static Set<String> warnedMods = Sets.newHashSet();
@@ -1101,6 +1103,13 @@ public class ForgeChunkManager
propOrder.add("dormantChunkCacheSize");
FMLLog.log.info("Configured a dormant chunk cache size of {}", temp.getInt(0));
temp = config.get("defaults", "asyncChunkLoading", true);
temp.setComment("Load chunks asynchronously for players, reducing load on the server thread.\n" +
"Can be disabled to help troubleshoot chunk loading issues.");
temp.setLanguageKey("forge.configgui.asyncChunkLoading");
asyncChunkLoading = temp.getBoolean(true);
propOrder.add("asyncChunkLoading");
config.setCategoryPropertyOrder("defaults", propOrder);
config.addCustomCategoryComment(ForgeVersion.MOD_ID, "Sample mod specific control section.\n" +