diff --git a/build.gradle b/build.gradle index ded17db06..64c2e5ed7 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'org.spongepowered.mixin' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = 'a1.5.0-pre' +version = 'a1.5.1-pre' group = 'com.seibel.lod' archivesBaseName = 'lod_1.16.5' diff --git a/src/main/java/com/seibel/lod/ModInfo.java b/src/main/java/com/seibel/lod/ModInfo.java index 7b0f3ed2f..59c0a6606 100644 --- a/src/main/java/com/seibel/lod/ModInfo.java +++ b/src/main/java/com/seibel/lod/ModInfo.java @@ -28,5 +28,5 @@ public final class ModInfo public static final String MODID = "lod"; public static final String MODNAME = "LOD"; public static final String MODAPI = "LodAPI"; - public static final String VERSION = "a1.5.0-pre"; + public static final String VERSION = "a1.5.1-pre"; } \ No newline at end of file diff --git a/src/main/java/com/seibel/lod/config/LodConfig.java b/src/main/java/com/seibel/lod/config/LodConfig.java index 156e26600..0962838c0 100644 --- a/src/main/java/com/seibel/lod/config/LodConfig.java +++ b/src/main/java/com/seibel/lod/config/LodConfig.java @@ -37,6 +37,7 @@ 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; @@ -100,6 +101,8 @@ public class LodConfig public ForgeConfigSpec.BooleanValue alwaysDrawAtMaxQuality; + public ForgeConfigSpec.EnumValue useFovSetting; + Graphics(ForgeConfigSpec.Builder builder) { @@ -162,6 +165,12 @@ 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" diff --git a/src/main/java/com/seibel/lod/proxy/ClientProxy.java b/src/main/java/com/seibel/lod/proxy/ClientProxy.java index 4922d4c36..efbacfda9 100644 --- a/src/main/java/com/seibel/lod/proxy/ClientProxy.java +++ b/src/main/java/com/seibel/lod/proxy/ClientProxy.java @@ -164,11 +164,13 @@ public class ClientProxy // remind the developer(s) that the config override is active if (!configOverrideReminderPrinted) { - mc.getPlayer().sendMessage(new StringTextComponent("Debug settings enabled!"), mc.getPlayer().getUUID()); + //mc.getPlayer().sendMessage(new StringTextComponent("Debug settings enabled!"), mc.getPlayer().getUUID()); + + mc.getPlayer().sendMessage(new StringTextComponent("LOD experimental build 1.5.1"), mc.getPlayer().getUUID()); + mc.getPlayer().sendMessage(new StringTextComponent("Here be dragons!"), mc.getPlayer().getUUID()); configOverrideReminderPrinted = true; } - // LodConfig.CLIENT.graphics.drawResolution.set(HorizontalResolution.BLOCK); // LodConfig.CLIENT.worldGenerator.generationResolution.set(HorizontalResolution.BLOCK); // requires a world restart? @@ -179,12 +181,12 @@ public class ClientProxy // LodConfig.CLIENT.graphics.shadingMode.set(ShadingMode.DARKEN_SIDES); // LodConfig.CLIENT.graphics.brightnessMultiplier.set(1.0); // LodConfig.CLIENT.graphics.saturationMultiplier.set(1.0); - + // LodConfig.CLIENT.worldGenerator.distanceGenerationMode.set(DistanceGenerationMode.SURFACE); // LodConfig.CLIENT.graphics.lodChunkRenderDistance.set(64); // LodConfig.CLIENT.worldGenerator.lodDistanceCalculatorType.set(DistanceCalculatorType.LINEAR); // LodConfig.CLIENT.worldGenerator.allowUnstableFeatureGeneration.set(false); - + // LodConfig.CLIENT.buffers.bufferRebuildPlayerMoveTimeout.set(2000); // 2000 // LodConfig.CLIENT.buffers.bufferRebuildChunkChangeTimeout.set(1000); // 1000 // LodConfig.CLIENT.buffers.bufferRebuildLodChangeTimeout.set(5000); // 5000 diff --git a/src/main/java/com/seibel/lod/render/LodRenderer.java b/src/main/java/com/seibel/lod/render/LodRenderer.java index 3f1d4d53c..457ac3d61 100644 --- a/src/main/java/com/seibel/lod/render/LodRenderer.java +++ b/src/main/java/com/seibel/lod/render/LodRenderer.java @@ -65,7 +65,7 @@ import net.minecraft.util.math.vector.Vector3d; * This is where LODs are draw to the world. * * @author James Seibel - * @version 9-23-2021 + * @version 9-28-2021 */ public class LodRenderer { @@ -483,6 +483,25 @@ public class LodRenderer } + /** James added this to test if Vivecraft is not using + * the MC FOV setting or if the problem is deeper */ + public enum FovTest + { + LOD_USE_FOV(true, false), + MC_USE_FOV(false, true), + NEITHER(false, false), + BOTH(true, true); + + boolean lodProjUseFov; + boolean defaultMcProjUseFov; + + private FovTest(boolean newLodProjUseFov, boolean newDefaultMcProjUseFov) + { + lodProjUseFov = newLodProjUseFov; + defaultMcProjUseFov = newDefaultMcProjUseFov; + } + } + /** * create a new projection matrix and send it over to the GPU * @@ -494,14 +513,14 @@ public class LodRenderer // create the new projection matrix Matrix4f lodPoj = Matrix4f.perspective( - getFov(partialTicks, true), + getFov(partialTicks, LodConfig.CLIENT.graphics.useFovSetting.get().lodProjUseFov), (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, true); + Matrix4f defaultMcProj = mc.getGameRenderer().getProjectionMatrix(mc.getGameRenderer().getMainCamera(), partialTicks, LodConfig.CLIENT.graphics.useFovSetting.get().defaultMcProjUseFov); // true here means use "use fov setting" (probably) diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index d49a91055..de9e50419 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -24,7 +24,7 @@ modId="lod" #mandatory #// The version number of the mod - there's a few well known ${} variables useable here or just hardcode it #//${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata #// see the associated build.gradle script for how to populate this completely automatically during a build -version="a1.5.0-pre" #mandatory +version="a1.5.1-pre" #mandatory #// A display name for the mod displayName="LOD" #mandatory