From cc42f8667f4fdf2766a86058c17ff6dc700c595a Mon Sep 17 00:00:00 2001 From: TomTheFurry Date: Sat, 26 Mar 2022 18:56:39 +0800 Subject: [PATCH] Update core --- .../java/com/seibel/lod/common/Config.java | 62 +++++++++ .../lod/common/wrappers/WrapperFactory.java | 2 +- .../config/LodConfigWrapperSingleton.java | 118 ++++++++++++++++++ .../BatchGenerationEnvironment.java | 69 +++++----- .../worldGeneration/GlobalParameters.java | 2 +- .../mimicObject/ChunkLoader.java | 7 +- .../mimicObject/LightedWorldGenRegion.java | 1 - core | 2 +- 8 files changed, 220 insertions(+), 43 deletions(-) diff --git a/common/src/main/java/com/seibel/lod/common/Config.java b/common/src/main/java/com/seibel/lod/common/Config.java index 7ee333aa9..ad59abdfb 100644 --- a/common/src/main/java/com/seibel/lod/common/Config.java +++ b/common/src/main/java/com/seibel/lod/common/Config.java @@ -30,6 +30,7 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.I import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IMultiplayer; import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IWorldGenerator; import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IAdvanced; +import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IAdvanced.IDebugging.*; /** @@ -398,6 +399,67 @@ public class Config public static String _enableDebugKeybindings = IDebugging.DEBUG_KEYBINDINGS_ENABLED_DESC; @ConfigAnnotations.Entry public static boolean enableDebugKeybindings = IDebugging.DEBUG_KEYBINDINGS_ENABLED_DEFAULT; + + @ConfigAnnotations.ScreenEntry + public static DebugSwitch debugSwitch; + + public static class DebugSwitch { + /* The logging switches available: + * WorldGenEvent + * WorldGenPerformance + * WorldGenLoadEvent + * LodBuilderEvent + * RendererBufferEvent + * RendererGLEvent + * FileReadWriteEvent + * FileSubDimEvent + * NetworkEvent //NOT IMPL YET + */ + @ConfigAnnotations.FileComment + public static String _logWorldGenEvent = IDebugSwitch.LOG_WORLDGEN_EVENT_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logWorldGenEvent = IDebugSwitch.LOG_WORLDGEN_EVENT_DEFAULT; + + @ConfigAnnotations.FileComment + public static String _logWorldGenPerformance = IDebugSwitch.LOG_WORLDGEN_PERFORMANCE_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logWorldGenPerformance = IDebugSwitch.LOG_WORLDGEN_PERFORMANCE_DEFAULT; + + @ConfigAnnotations.FileComment + public static String _logWorldGenLoadEvent = IDebugSwitch.LOG_WORLDGEN_LOAD_EVENT_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logWorldGenLoadEvent = IDebugSwitch.LOG_WORLDGEN_LOAD_EVENT_DEFAULT; + + @ConfigAnnotations.FileComment + public static String _logLodBuilderEvent = IDebugSwitch.LOG_LODBUILDER_EVENT_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logLodBuilderEvent = IDebugSwitch.LOG_LODBUILDER_EVENT_DEFAULT; + + @ConfigAnnotations.FileComment + public static String _logRendererBufferEvent = IDebugSwitch.LOG_RENDERER_BUFFER_EVENT_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logRendererBufferEvent = IDebugSwitch.LOG_RENDERER_BUFFER_EVENT_DEFAULT; + + @ConfigAnnotations.FileComment + public static String _logRendererGLEvent = IDebugSwitch.LOG_RENDERER_GL_EVENT_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logRendererGLEvent = IDebugSwitch.LOG_RENDERER_GL_EVENT_DEFAULT; + + @ConfigAnnotations.FileComment + public static String _logFileReadWriteEvent = IDebugSwitch.LOG_FILE_READWRITE_EVENT_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logFileReadWriteEvent = IDebugSwitch.LOG_FILE_READWRITE_EVENT_DEFAULT; + + @ConfigAnnotations.FileComment + public static String _logFileSubDimEvent = IDebugSwitch.LOG_FILE_SUB_DIM_EVENT_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logFileSubDimEvent = IDebugSwitch.LOG_FILE_SUB_DIM_EVENT_DEFAULT; + + @ConfigAnnotations.FileComment + public static String _logNetworkEvent = IDebugSwitch.LOG_NETWORK_EVENT_DESC; + @ConfigAnnotations.Entry + public static LoggerMode logNetworkEvent = IDebugSwitch.LOG_NETWORK_EVENT_DEFAULT; + } } diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/WrapperFactory.java b/common/src/main/java/com/seibel/lod/common/wrappers/WrapperFactory.java index 9fc8a83b9..d6839eb71 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/WrapperFactory.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/WrapperFactory.java @@ -19,7 +19,7 @@ package com.seibel.lod.common.wrappers; -import com.seibel.lod.core.objects.opengl.builders.lodBuilding.LodBuilder; +import com.seibel.lod.core.builders.lodBuilding.LodBuilder; import com.seibel.lod.core.objects.lod.LodDimension; import com.seibel.lod.core.wrapperInterfaces.IWrapperFactory; import com.seibel.lod.core.wrapperInterfaces.block.AbstractBlockPosWrapper; diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/config/LodConfigWrapperSingleton.java b/common/src/main/java/com/seibel/lod/common/wrappers/config/LodConfigWrapperSingleton.java index bbba2eb72..0a1ef4cce 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/config/LodConfigWrapperSingleton.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/config/LodConfigWrapperSingleton.java @@ -736,6 +736,14 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton //===============// public static class Debugging implements IDebugging { + public final IDebugSwitch debugSwitch; + + @Override + public IDebugSwitch debugSwitch() + { + return debugSwitch; + } + @Override public boolean getDrawLods() { @@ -773,6 +781,116 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton ConfigGui.editSingleOption.getEntry("client.advanced.debugging.enableDebugKeybindings").value = newEnableDebugKeybindings; ConfigGui.editSingleOption.saveOption("client.advanced.debugging.enableDebugKeybindings"); } + + public Debugging() + { + debugSwitch = new DebugSwitch(); + } + + public static class DebugSwitch implements IDebugSwitch { + + /* The logging switches available: + * WorldGenEvent + * WorldGenPerformance + * WorldGenLoadEvent + * LodBuilderEvent + * RendererBufferEvent + * RendererGLEvent + * FileReadWriteEvent + * FileSubDimEvent + * NetworkEvent //NOT IMPL YET + */ + + @Override + public LoggerMode getLogWorldGenEvent() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logWorldGenEvent").value; + } + @Override + public void setLogWorldGenEvent(LoggerMode newLogWorldGenEvent) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logWorldGenEvent").value = newLogWorldGenEvent; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logWorldGenEvent"); + } + + @Override + public LoggerMode getLogWorldGenPerformance() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logWorldGenPerformance").value; + } + @Override + public void setLogWorldGenPerformance(LoggerMode newLogWorldGenPerformance) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logWorldGenPerformance").value = newLogWorldGenPerformance; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logWorldGenPerformance"); + } + + @Override + public LoggerMode getLogWorldGenLoadEvent() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logWorldGenLoadEvent").value; + } + @Override + public void setLogWorldGenLoadEvent(LoggerMode newLogWorldGenLoadEvent) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logWorldGenLoadEvent").value = newLogWorldGenLoadEvent; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logWorldGenLoadEvent"); + } + + @Override + public LoggerMode getLogLodBuilderEvent() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logLodBuilderEvent").value; + } + @Override + public void setLogLodBuilderEvent(LoggerMode newLogLodBuilderEvent) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logLodBuilderEvent").value = newLogLodBuilderEvent; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logLodBuilderEvent"); + } + + @Override + public LoggerMode getLogRendererBufferEvent() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logRendererBufferEvent").value; + } + @Override + public void setLogRendererBufferEvent(LoggerMode newLogRendererBufferEvent) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logRendererBufferEvent").value = newLogRendererBufferEvent; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logRendererBufferEvent"); + } + + @Override + public LoggerMode getLogRendererGLEvent() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logRendererGLEvent").value; + } + @Override + public void setLogRendererGLEvent(LoggerMode newLogRendererGLEvent) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logRendererGLEvent").value = newLogRendererGLEvent; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logRendererGLEvent"); + } + + @Override + public LoggerMode getLogFileReadWriteEvent() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logFileReadWriteEvent").value; + } + @Override + public void setLogFileReadWriteEvent(LoggerMode newLogFileReadWriteEvent) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logFileReadWriteEvent").value = newLogFileReadWriteEvent; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logFileReadWriteEvent"); + } + + @Override + public LoggerMode getLogFileSubDimEvent() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logFileSubDimEvent").value; + } + @Override + public void setLogFileSubDimEvent(LoggerMode newLogFileSubDimEvent) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logFileSubDimEvent").value = newLogFileSubDimEvent; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logFileSubDimEvent"); + } + + @Override + public LoggerMode getLogNetworkEvent() { + return (LoggerMode) ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logNetworkEvent").value; + } + @Override + public void setLogNetworkEvent(LoggerMode newLogNetworkEvent) { + ConfigGui.editSingleOption.getEntry("client.advanced.debugging.debugSwitch.logNetworkEvent").value = newLogNetworkEvent; + ConfigGui.editSingleOption.saveOption("client.advanced.debugging.debugSwitch.logNetworkEvent"); + } + } } diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java index 308e25109..4494682f3 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java @@ -19,9 +19,10 @@ package com.seibel.lod.common.wrappers.worldGeneration; -import com.seibel.lod.core.api.ApiShared; -import com.seibel.lod.core.objects.opengl.builders.lodBuilding.LodBuilder; -import com.seibel.lod.core.objects.opengl.builders.lodBuilding.LodBuilderConfig; +import com.seibel.lod.core.logging.ConfigBasedLogger; +import com.seibel.lod.core.logging.ConfigBasedSpamLogger; +import com.seibel.lod.core.builders.lodBuilding.LodBuilder; +import com.seibel.lod.core.builders.lodBuilding.LodBuilderConfig; import com.seibel.lod.core.enums.config.DistanceGenerationMode; import com.seibel.lod.core.enums.config.LightGenerationMode; import com.seibel.lod.core.handlers.dependencyInjection.SingletonHandler; @@ -87,9 +88,14 @@ Lod Generation: 0.269023348s public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnvionmentWrapper { - public static final boolean ENABLE_PERF_LOGGING = false; - public static final boolean ENABLE_EVENT_LOGGING = false; - public static final boolean ENABLE_LOAD_EVENT_LOGGING = false; + private static final ILodConfigWrapperSingleton CONFIG = SingletonHandler.get(ILodConfigWrapperSingleton.class); + public static final ConfigBasedSpamLogger PREF_LOGGER = + new ConfigBasedSpamLogger(() -> CONFIG.client().advanced().debugging().debugSwitch().getLogWorldGenPerformance(),1); + public static final ConfigBasedLogger EVENT_LOGGER = + new ConfigBasedLogger(() -> CONFIG.client().advanced().debugging().debugSwitch().getLogWorldGenEvent()); + public static final ConfigBasedLogger LOAD_LOGGER = + new ConfigBasedLogger(() -> CONFIG.client().advanced().debugging().debugSwitch().getLogWorldGenLoadEvent()); + //TODO: Make actual proper support for StarLight public static class PrefEvent @@ -224,7 +230,6 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv public final StepLight stepLight = new StepLight(this); public boolean unsafeThreadingRecorded = false; //public boolean safeMode = false; - private static final ILodConfigWrapperSingleton CONFIG = SingletonHandler.get(ILodConfigWrapperSingleton.class); private static final IMinecraftClientWrapper MC = SingletonHandler.get(IMinecraftClientWrapper.class); public static final long EXCEPTION_TIMER_RESET_TIME = TimeUnit.NANOSECONDS.convert(1, TimeUnit.SECONDS); public static final int EXCEPTION_COUNTER_TRIGGER = 20; @@ -249,9 +254,8 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv public T joinSync(CompletableFuture f) { if (!unsafeThreadingRecorded && !f.isDone()) { - MC.sendChatMessage("\u00A74\u00A7l\u00A7uERROR: Distant Horizons: Unsafe Threading in Chunk Generator Detected!"); - MC.sendChatMessage("\u00A7eTo increase stability, it is recommended to set world generation threads count to 1."); - ApiShared.LOGGER.error("Unsafe Threading in Chunk Generator: ", new RuntimeException("Concurrent future")); + EVENT_LOGGER.error("Unsafe Threading in Chunk Generator: ", new RuntimeException("Concurrent future")); + EVENT_LOGGER.error("To increase stability, it is recommended to set world generation threads count to 1."); unsafeThreadingRecorded = true; } return f.join(); @@ -300,8 +304,8 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } catch (Throwable e) { - ApiShared.LOGGER.error("Batching World Generator: Event {} gotten an exception", event); - ApiShared.LOGGER.error("Exception: ", e); + EVENT_LOGGER.error("Batching World Generator: Event {} gotten an exception", event); + EVENT_LOGGER.error("Exception: ", e); unknownExceptionCount++; lastExceptionTriggerTime = System.nanoTime(); } @@ -312,12 +316,12 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } else if (event.hasTimeout(TIMEOUT_SECONDS, TimeUnit.SECONDS)) { - ApiShared.LOGGER.error("Batching World Generator: " + event + " timed out and terminated!"); - ApiShared.LOGGER.info("Dump PrefEvent: " + event.pEvent); + EVENT_LOGGER.error("Batching World Generator: " + event + " timed out and terminated!"); + EVENT_LOGGER.info("Dump PrefEvent: " + event.pEvent); try { if (!event.terminate()) - ApiShared.LOGGER.error("Failed to terminate the stuck generation event!"); + EVENT_LOGGER.error("Failed to terminate the stuck generation event!"); } finally { @@ -326,10 +330,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } } if (unknownExceptionCount > EXCEPTION_COUNTER_TRIGGER) { - try { - MC.sendChatMessage("\u00A74\u00A7l\u00A7uERROR: Distant Horizons: Too many exceptions in Batching World Generator! Disabling the generator."); - } catch (Exception e) {} - ApiShared.LOGGER.error("Too many exceptions in Batching World Generator! Now disabling."); + EVENT_LOGGER.error("Too many exceptions in Batching World Generator! Disabling the generator."); unknownExceptionCount = 0; CONFIG.client().worldGenerator().setEnableDistantGeneration(false); } @@ -338,14 +339,13 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv public BatchGenerationEnvironment(IWorldWrapper serverlevel, LodBuilder lodBuilder, LodDimension lodDim) { super(serverlevel, lodBuilder, lodDim); - ApiShared.LOGGER.info("================WORLD_GEN_STEP_INITING============="); + EVENT_LOGGER.info("================WORLD_GEN_STEP_INITING============="); ChunkGenerator generator = ((WorldWrapper) serverlevel).getServerWorld().getChunkSource().getGenerator(); if (!(generator instanceof NoiseBasedChunkGenerator || generator instanceof DebugLevelSource || generator instanceof FlatLevelSource)) { - MC.sendChatMessage("\u00A74\u00A7l\u00A7uWARNING: Distant Horizons: Unknown Chunk Generator Detected! Distant Generation May Fail!"); - MC.sendChatMessage("\u00A7eIf it does crash, set Distant Generation to OFF or Generation Mode to None."); - ApiShared.LOGGER.warn("Unknown Chunk Generator detected: {}", generator.getClass()); + EVENT_LOGGER.warn("Unknown Chunk Generator detected: [{}], Distant Generation May Fail!", generator.getClass()); + EVENT_LOGGER.warn("If it does crash, set Distant Generation to OFF or Generation Mode to None."); } params = new GlobalParameters((ServerLevel) ((WorldWrapper) serverlevel).getWorld(), lodBuilder, lodDim); } @@ -360,7 +360,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } catch (Exception e) { - ApiShared.LOGGER.error("DistantHorizons: Couldn't load chunk {}", chunkPos, e); + LOAD_LOGGER.error("DistantHorizons: Couldn't load chunk {}", chunkPos, e); } if (chunkData == null) { @@ -371,7 +371,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv try { return ChunkLoader.read(level, lightEngine, chunkPos, chunkData); } catch (Exception e) { - ApiShared.LOGGER.error("DistantHorizons: Couldn't load chunk {}", chunkPos, e); + LOAD_LOGGER.error("DistantHorizons: Couldn't load chunk {}", chunkPos, e); return new ProtoChunk(chunkPos, UpgradeData.EMPTY, level, level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), null); } } @@ -380,8 +380,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv public void generateLodFromList(GenerationEvent e) { - if (ENABLE_EVENT_LOGGING) - ApiShared.LOGGER.info("Lod Generate Event: " + e.pos); + EVENT_LOGGER.debug("Lod Generate Event: " + e.pos); e.pEvent.beginNano = System.nanoTime(); ArrayGridList referencedChunks; ArrayGridList genChunks; @@ -474,15 +473,13 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv boolean isPartial = target.isOldNoiseGeneration(); if (isFull) { - if (ENABLE_LOAD_EVENT_LOGGING) - ApiShared.LOGGER.info("Detected full existing chunk at {}", target.getPos()); + LOAD_LOGGER.info("Detected full existing chunk at {}", target.getPos()); params.lodBuilder.generateLodNodeFromChunk(params.lodDim, wrappedChunk, new LodBuilderConfig(DistanceGenerationMode.FULL), true, e.genAllDetails); } else if (isPartial) { - if (ENABLE_LOAD_EVENT_LOGGING) - ApiShared.LOGGER.info("Detected old existing chunk at {}", target.getPos()); + LOAD_LOGGER.info("Detected old existing chunk at {}", target.getPos()); params.lodBuilder.generateLodNodeFromChunk(params.lodDim, wrappedChunk, new LodBuilderConfig(generationMode), true, e.genAllDetails); } @@ -505,10 +502,10 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv } e.pEvent.endNano = System.nanoTime(); e.refreshTimeout(); - if (ENABLE_PERF_LOGGING) + if (PREF_LOGGER.canMaybeLog()) { e.tParam.perf.recordEvent(e.pEvent); - ApiShared.LOGGER.info(e.tParam.perf); + PREF_LOGGER.infoInc("{}", e.tParam.perf); } } @@ -594,14 +591,14 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv @Override public void stop(boolean blocking) { - ApiShared.LOGGER.info("Batch Chunk Generator shutting down..."); + EVENT_LOGGER.info("Batch Chunk Generator shutting down..."); executors.shutdownNow(); if (blocking) try { if (!executors.awaitTermination(10, TimeUnit.SECONDS)) { - ApiShared.LOGGER.error("Batch Chunk Generator shutdown failed! Ignoring child threads..."); + EVENT_LOGGER.error("Batch Chunk Generator shutdown failed! Ignoring child threads..."); } } catch (InterruptedException e) { - ApiShared.LOGGER.error("Batch Chunk Generator shutdown failed! Ignoring child threads...", e); + EVENT_LOGGER.error("Batch Chunk Generator shutdown failed! Ignoring child threads...", e); } } } \ No newline at end of file diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/GlobalParameters.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/GlobalParameters.java index f5b300aaf..9d604028b 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/GlobalParameters.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/GlobalParameters.java @@ -2,7 +2,7 @@ package com.seibel.lod.common.wrappers.worldGeneration; import com.mojang.datafixers.DataFixer; -import com.seibel.lod.core.objects.opengl.builders.lodBuilding.LodBuilder; +import com.seibel.lod.core.builders.lodBuilding.LodBuilder; import com.seibel.lod.core.objects.lod.LodDimension; import net.minecraft.core.Registry; diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java index b482312d7..b17ee8d7f 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/ChunkLoader.java @@ -4,9 +4,10 @@ package com.seibel.lod.common.wrappers.worldGeneration.mimicObject; import com.google.common.collect.Maps; import com.mojang.serialization.Codec; import com.mojang.serialization.Dynamic; +import com.seibel.lod.common.wrappers.worldGeneration.BatchGenerationEnvironment; import com.seibel.lod.core.api.ApiShared; -import com.seibel.lod.core.api.ClientApi; +import com.seibel.lod.core.logging.ConfigBasedLogger; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import it.unimi.dsi.fastutil.longs.LongSet; import java.util.Arrays; @@ -56,7 +57,7 @@ import org.apache.logging.log4j.Logger; public class ChunkLoader { private static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codec(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState()); - private static final Logger LOGGER = ApiShared.LOGGER; + private static final ConfigBasedLogger LOGGER = BatchGenerationEnvironment.LOAD_LOGGER; private static final String TAG_UPGRADE_DATA = "UpgradeData"; private static final String BLOCK_TICKS_TAG = "block_ticks"; private static final String FLUID_TICKS_TAG = "fluid_ticks"; @@ -279,7 +280,7 @@ public class ChunkLoader ChunkPos actualPos = new ChunkPos(chunkData.getInt("xPos"), chunkData.getInt("zPos")); if (!Objects.equals(chunkPos, actualPos)) { - LOGGER.error("Distant Horizons: Chunk file at {} is in the wrong location; Ignoring. (Expected {}, got {})", (Object) chunkPos, (Object) chunkPos, (Object) actualPos); + LOGGER.error("Chunk file at {} is in the wrong location; Ignoring. (Expected {}, got {})", (Object) chunkPos, (Object) chunkPos, (Object) actualPos); return null; } diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java index d754a6d0f..b06baf39b 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/LightedWorldGenRegion.java @@ -6,7 +6,6 @@ import com.seibel.lod.core.api.ApiShared; import org.jetbrains.annotations.Nullable; import com.seibel.lod.common.wrappers.worldGeneration.BatchGenerationEnvironment.EmptyChunkGenerator; -import com.seibel.lod.core.api.ClientApi; import com.seibel.lod.core.enums.config.LightGenerationMode; import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; diff --git a/core b/core index 665a5a8be..5178aa7de 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 665a5a8beed38e211be923d98a55b13e932ef0a0 +Subproject commit 5178aa7def1a670a3ff73332389d3da5289ea45b