diff --git a/src/main/java/makeo/gadomancy/common/data/ModConfig.java b/src/main/java/makeo/gadomancy/common/data/ModConfig.java index ee8d632..3275e58 100644 --- a/src/main/java/makeo/gadomancy/common/data/ModConfig.java +++ b/src/main/java/makeo/gadomancy/common/data/ModConfig.java @@ -18,6 +18,7 @@ public class ModConfig { public static int golemDatawatcherId = 29; public static int dimOuterId = -73; + public static boolean doLightCalculations; public static int maxMazeCount = -1; private ModConfig() {} @@ -35,6 +36,7 @@ public class ModConfig { private static void loadFromConfig() { golemDatawatcherId = config.getInt("datawatcherId", "golem", 29, 0, 31, "Do not edit unless you know what are you doing!"); dimOuterId = config.getInt("dimOuterId", "dimension", -73, Integer.MIN_VALUE, Integer.MAX_VALUE, "Dimension Id for the eldrich mazes accessed via Node Manipulator"); + doLightCalculations = config.getBoolean("calculateEldritchLight", "dimension", true, "TRUE = Calculating Light values for the Gadomancy-Eldritch Mazes; FALSE = No calculation, but some Light Bugs - Calculating the Light takes ~2 seconds -> Can be measured when trying to enter the eldritch mazed via Gadomancy Eldritch portal."); maxMazeCount = config.getInt("maxMazeCount", "dimension", -1, -1, Integer.MAX_VALUE, "Defines how many Eldritch mazes may exist at the same time using the Gadomancy Eldritch ritual. (-1 = infinite) Note that 1 maze = 1 player; Once the player finishes the maze, the maze closes itself and teleports the player out."); } } diff --git a/src/main/java/makeo/gadomancy/common/utils/world/TCMazeHandler.java b/src/main/java/makeo/gadomancy/common/utils/world/TCMazeHandler.java index 4836fcc..1527bc0 100644 --- a/src/main/java/makeo/gadomancy/common/utils/world/TCMazeHandler.java +++ b/src/main/java/makeo/gadomancy/common/utils/world/TCMazeHandler.java @@ -258,11 +258,13 @@ public class TCMazeHandler { } MazeHandler.labyrinth = old; - for(CellLoc l : chunksAffected.keySet()) { - for(int cX = 0; cX < 16; cX++) { - for(int cY = 51; cY < 61; cY++) { - for(int cZ = 0; cZ < 16; cZ++) { - TCMazeHandler.GEN.updateLightByType(EnumSkyBlock.Block, (l.x << 4)+cX, cY, (l.z << 4)+cZ); + if(ModConfig.doLightCalculations) { + for(CellLoc l : chunksAffected.keySet()) { + for(int cX = 0; cX < 16; cX++) { + for(int cY = 51; cY < 61; cY++) { + for(int cZ = 0; cZ < 16; cZ++) { + TCMazeHandler.GEN.updateLightByType(EnumSkyBlock.Block, (l.x << 4)+cX, cY, (l.z << 4)+cZ); + } } } }