From c3f8b0b677bd77fc36696771eaf60da16a6a173d Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 9 Oct 2021 19:47:26 -0500 Subject: [PATCH] Remove the experimental useFovSetting setting --- .../java/com/seibel/lod/config/LodConfig.java | 23 +------------------ .../com/seibel/lod/render/LodRenderer.java | 4 ++-- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/seibel/lod/config/LodConfig.java b/src/main/java/com/seibel/lod/config/LodConfig.java index 4ddb893aa..930424f4d 100644 --- a/src/main/java/com/seibel/lod/config/LodConfig.java +++ b/src/main/java/com/seibel/lod/config/LodConfig.java @@ -39,7 +39,6 @@ import com.seibel.lod.enums.HorizontalResolution; import com.seibel.lod.enums.HorizontalScale; import com.seibel.lod.enums.LodTemplate; import com.seibel.lod.enums.VerticalQuality; -import com.seibel.lod.render.LodRenderer.FovTest; import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -50,7 +49,7 @@ import net.minecraftforge.fml.config.ModConfig; * This handles any configuration the user has access to. * * @author James Seibel - * @version 9-26-2021 + * @version 10-9-2021 */ @Mod.EventBusSubscriber public class LodConfig @@ -100,8 +99,6 @@ public class LodConfig public ForgeConfigSpec.BooleanValue drawLods; - public ForgeConfigSpec.EnumValue useFovSetting; - Graphics(ForgeConfigSpec.Builder builder) { @@ -164,12 +161,6 @@ public class LodConfig + " The mod's render distance, measured in chunks. \n") .defineInRange("lodChunkRenderDistance", 64, 32, 1024); - useFovSetting = builder - .comment("\n\n" - + " Experimental text value. \n" - + " " + FovTest.BOTH + ": is the normal value \n") - .defineEnum("useFovSetting", FovTest.BOTH); - disableDirectionalCulling = builder .comment("\n\n" + " If false LODs that are behind the player's camera \n" @@ -182,18 +173,6 @@ public class LodConfig + " (This may happen if you are using a camera mod) \n") .define("disableDirectionalCulling", false); -// shadingMode = builder -// .comment("\n\n" -// + " What kind of shading should the LODs have? \n" -// + " \n" -// + " " + ShadingMode.NONE + " \n" -// + " " + "LODs will have the same lighting on every side. \n" -// + " " + "Can make large similarly colored areas hard to differentiate. \n" -// + "\n" -// + " " + ShadingMode.GAME_SHADING + " \n" -// + " " + "LODs will have darker sides and bottoms to simulate Minecraft's flat lighting.") -// .defineEnum("lightingMode", ShadingMode.GAME_SHADING); - alwaysDrawAtMaxQuality = builder .comment("\n\n" + " Disable LOD quality falloff, " diff --git a/src/main/java/com/seibel/lod/render/LodRenderer.java b/src/main/java/com/seibel/lod/render/LodRenderer.java index 3c25a1832..3940b3458 100644 --- a/src/main/java/com/seibel/lod/render/LodRenderer.java +++ b/src/main/java/com/seibel/lod/render/LodRenderer.java @@ -525,14 +525,14 @@ public class LodRenderer // create the new projection matrix Matrix4f lodPoj = Matrix4f.perspective( - getFov(partialTicks, LodConfig.CLIENT.graphics.useFovSetting.get().lodProjUseFov), + getFov(partialTicks, true), (float) this.mc.getWindow().getScreenWidth() / (float) this.mc.getWindow().getScreenHeight(), mc.getRenderDistance() / 2, farPlaneBlockDistance * LodUtil.CHUNK_WIDTH * 2 / 4); // get Minecraft's un-edited projection matrix // (this is before it is zoomed, distorted, etc.) - Matrix4f defaultMcProj = mc.getGameRenderer().getProjectionMatrix(mc.getGameRenderer().getMainCamera(), partialTicks, LodConfig.CLIENT.graphics.useFovSetting.get().defaultMcProjUseFov); + Matrix4f defaultMcProj = mc.getGameRenderer().getProjectionMatrix(mc.getGameRenderer().getMainCamera(), partialTicks, true); // true here means use "use fov setting" (probably)