Slight change

This commit is contained in:
mcrcortex
2026-01-02 13:12:47 +10:00
parent cff4866499
commit c5e447125b
2 changed files with 7 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ public class VoxyConfig {
Logger.error("Could not parse config", e);
}
}
Logger.info("Config doesnt exist, creating new");
var config = new VoxyConfig();
config.save();
return config;
@@ -60,6 +61,11 @@ public class VoxyConfig {
}
public void save() {
if (!VoxyCommon.isAvailable()) {
Logger.info("Not saving config since voxy is unavalible");
return;
}
try {
Files.writeString(getConfigPath(), GSON.toJson(this));
} catch (IOException e) {

View File

@@ -22,7 +22,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
public class MixinFogRenderer {
@Inject(method = "setupFog", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;getDevice()Lcom/mojang/blaze3d/systems/GpuDevice;", remap = false))
private void voxy$modifyFog(Camera camera, int rdInt, DeltaTracker tracker, float pTick, ClientLevel lvl, CallbackInfoReturnable<Vector4f> cir, @Local(type=FogData.class) FogData data) {
if (!(VoxyConfig.CONFIG.enableRendering&&VoxyConfig.CONFIG.enabled)) return;
if (!VoxyConfig.CONFIG.isRenderingEnabled()) return;
var vrs = IGetVoxyRenderSystem.getNullable();
if (vrs == null) return;