- Made Light Calculations config dependent to make it "users-choice"

This commit is contained in:
HellFirePvP committed 2015-11-12 20:25:19 +01:00
1 parent d5deb28518
commit be6a56b8d8
2 files changed
+9 -5

No files matched your search

@@ -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.");
}
}
@@ -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);
}
}
}
}