Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
mcrcortex
2025-12-02 08:53:48 +10:00
3 changed files with 13 additions and 9 deletions

View File

@@ -113,7 +113,7 @@ public class VoxyClientInstance extends VoxyInstance {
@Override @Override
public boolean isIngestEnabled(WorldIdentifier worldId) { public boolean isIngestEnabled(WorldIdentifier worldId) {
return !this.noIngestOverride; return (!this.noIngestOverride) && VoxyConfig.CONFIG.ingestEnabled;
} }
private static class Config { private static class Config {

View File

@@ -112,7 +112,7 @@ public class MixinRenderSectionManager {
} }
int x = instance.getChunkX(), y = instance.getChunkY(), z = instance.getChunkZ(); int x = instance.getChunkX(), y = instance.getChunkY(), z = instance.getChunkZ();
if (wasBuilt) { if (wasBuilt && VoxyConfig.CONFIG.ingestEnabled) {
var tracker = ((AccessorChunkTracker)ChunkTrackerHolder.get(this.level)).getChunkStatus(); var tracker = ((AccessorChunkTracker)ChunkTrackerHolder.get(this.level)).getChunkStatus();
//in theory the cache value could be wrong but is so soso unlikely and at worst means we either duplicate ingest a chunk //in theory the cache value could be wrong but is so soso unlikely and at worst means we either duplicate ingest a chunk
// which... could be bad ;-; or we dont ingest atall which is ok! // which... could be bad ;-; or we dont ingest atall which is ok!

View File

@@ -53,13 +53,17 @@ public class Logger {
String error = (INSERT_CLASS?("["+callClsName()+"]: "):"") + Stream.of(args).map(Logger::objToString).collect(Collectors.joining(" ")); String error = (INSERT_CLASS?("["+callClsName()+"]: "):"") + Stream.of(args).map(Logger::objToString).collect(Collectors.joining(" "));
LOGGER.error(error, throwable); LOGGER.error(error, throwable);
if (VoxyCommon.IS_IN_MINECRAFT && !VoxyCommon.IS_DEDICATED_SERVER) { if (VoxyCommon.IS_IN_MINECRAFT && !VoxyCommon.IS_DEDICATED_SERVER) {
var instance = Minecraft.getInstance(); error0(error);//This is done so that on dedicated server, the Minecraft client class isnt loaded
if (instance != null) { }
instance.executeIfPossible(() -> { }
var player = Minecraft.getInstance().player;
if (player != null) player.displayClientMessage(Component.literal(error), true); private static void error0(String error) {
}); var instance = Minecraft.getInstance();
} if (instance != null) {
instance.executeIfPossible(() -> {
var player = Minecraft.getInstance().player;
if (player != null) player.displayClientMessage(Component.literal(error), true);
});
} }
} }