Slight change
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user