From 35d97fa98fa85ec7b69c4d9ec2964208a280bcaf Mon Sep 17 00:00:00 2001 From: Ran <43445785+RanCraftPlayz@users.noreply.github.com> Date: Sat, 23 Apr 2022 11:07:48 +0600 Subject: [PATCH] Please do it like this I want things to be simple --- .../seibel/lod/fabric/mixins/MixinFogRenderer.java | 5 +++-- fabric/src/main/resources/quilt.mod.json | 12 ++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinFogRenderer.java b/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinFogRenderer.java index cb60aa08c..62a2912ea 100644 --- a/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinFogRenderer.java +++ b/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinFogRenderer.java @@ -42,14 +42,15 @@ import net.minecraft.world.level.material.FogType; @Mixin(FogRenderer.class) public class MixinFogRenderer { - private static final ILodConfigWrapperSingleton CONFIG = SingletonHandler.get(ILodConfigWrapperSingleton.class); - + private static ILodConfigWrapperSingleton CONFIG; + // Using this instead of Float.MAX_VALUE because Sodium don't like it. private static final float A_REALLY_REALLY_BIG_VALUE = 420694206942069.F; private static final float A_EVEN_LARGER_VALUE = 42069420694206942069.F; @Inject(at = @At("RETURN"), method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZ)V") private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, CallbackInfo callback) { + if (CONFIG == null) CONFIG = SingletonHandler.get(ILodConfigWrapperSingleton.class); #if PRE_MC_1_17_1 FluidState fluidState = camera.getFluidInCamera(); boolean cameraNotInFluid = fluidState.isEmpty(); diff --git a/fabric/src/main/resources/quilt.mod.json b/fabric/src/main/resources/quilt.mod.json index c4899581e..40f9102b3 100644 --- a/fabric/src/main/resources/quilt.mod.json +++ b/fabric/src/main/resources/quilt.mod.json @@ -1,13 +1,16 @@ { "schema_version": 1, "quilt_loader": { - "group": "com.example", + "group": "com.seibel.lod", "id": "lod", "version": "${version}", "metadata": { "name": "${mod_name}", "description": "${description}", - "contributors": ${authors}, + "contributors": { + "This needs to be": "an object", + "I Already Don't Like": "Quilt" + }, "icon": "icon.png" }, "entrypoints": { @@ -37,5 +40,6 @@ } ] }, - "mixin": "fabric.lod.mixins.json" -} \ No newline at end of file + "mixin": "fabric.lod.mixins.json", + "accessWidener" : "lod.accesswidener" + } \ No newline at end of file