Rename FogType and FogMode
FogType -> FogQuality FogMode -> FogDistanceMode
This commit is contained in:
@@ -10,8 +10,8 @@ import backsun.lod.objects.LodChunk;
|
||||
import backsun.lod.util.OfConfig;
|
||||
import backsun.lod.util.enums.ColorDirection;
|
||||
import backsun.lod.util.enums.LodLocation;
|
||||
import backsun.lod.util.fog.FogMode;
|
||||
import backsun.lod.util.fog.FogType;
|
||||
import backsun.lod.util.fog.FogDistanceMode;
|
||||
import backsun.lod.util.fog.FogQuality;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -379,7 +379,7 @@ public class LodRenderer
|
||||
colorIndex++;
|
||||
}
|
||||
|
||||
setupFog(FogMode.NEAR, ofConfig.getFogType());
|
||||
setupFog(FogDistanceMode.NEAR, ofConfig.getFogType());
|
||||
|
||||
mc.world.profiler.endStartSection("LOD draw");
|
||||
|
||||
@@ -387,16 +387,16 @@ public class LodRenderer
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
private void setupFog(FogMode fogMode, FogType fogType)
|
||||
private void setupFog(FogDistanceMode fogMode, FogQuality fogQuality)
|
||||
{
|
||||
if(fogMode == FogMode.NONE || fogType == FogType.OFF)
|
||||
if(fogQuality == FogQuality.OFF)
|
||||
{
|
||||
GlStateManager.disableFog();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(fogMode == FogMode.NEAR)
|
||||
if(fogMode == FogDistanceMode.NEAR)
|
||||
{
|
||||
// the multipliers are percentages
|
||||
// of the normal view distance.
|
||||
@@ -406,7 +406,7 @@ public class LodRenderer
|
||||
// it is normally used, with it hiding near objects
|
||||
// instead of far objects.
|
||||
|
||||
if (fogType == FogType.FANCY || fogType == FogType.UNKNOWN)
|
||||
if (fogQuality == FogQuality.FANCY || fogQuality == FogQuality.UNKNOWN)
|
||||
{
|
||||
GlStateManager.setFogEnd(farPlaneDistance * 2.0f);
|
||||
GlStateManager.setFogStart(farPlaneDistance * 2.25f);
|
||||
@@ -422,7 +422,7 @@ public class LodRenderer
|
||||
// the multipliers are percentages of
|
||||
// the LOD view distance.
|
||||
|
||||
if (fogType == FogType.FANCY || fogType == FogType.UNKNOWN)
|
||||
if (fogQuality == FogQuality.FANCY || fogQuality == FogQuality.UNKNOWN)
|
||||
{
|
||||
GlStateManager.setFogStart(farPlaneDistance * 0.5f * VIEW_DISTANCE_MULTIPLIER / 2.0f);
|
||||
GlStateManager.setFogEnd(farPlaneDistance * 1.0f * VIEW_DISTANCE_MULTIPLIER / 2.0f);
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Parameter;
|
||||
|
||||
import backsun.lod.util.fog.FogType;
|
||||
import backsun.lod.util.fog.FogQuality;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
/**
|
||||
@@ -123,14 +123,14 @@ public class OfConfig
|
||||
|
||||
|
||||
|
||||
public FogType getFogType()
|
||||
public FogQuality getFogType()
|
||||
{
|
||||
if (ofFogField == null)
|
||||
{
|
||||
// either optifine isn't installed,
|
||||
// the variable name was changed,
|
||||
// or the setup method wasn't called yet.
|
||||
return FogType.UNKNOWN;
|
||||
return FogQuality.UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,20 +146,19 @@ public class OfConfig
|
||||
System.out.println(e);
|
||||
}
|
||||
|
||||
|
||||
switch (returnNum)
|
||||
{
|
||||
case 0:
|
||||
return FogType.UNKNOWN;
|
||||
return FogQuality.UNKNOWN;
|
||||
case 1:
|
||||
return FogType.FAST;
|
||||
return FogQuality.FAST;
|
||||
case 2:
|
||||
return FogType.FANCY;
|
||||
return FogQuality.FANCY;
|
||||
case 3:
|
||||
return FogType.OFF;
|
||||
return FogQuality.OFF;
|
||||
|
||||
default:
|
||||
return FogType.UNKNOWN;
|
||||
return FogQuality.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package backsun.lod.util.fog;
|
||||
|
||||
/**
|
||||
* Near, far, or both.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 01-27-2021
|
||||
*/
|
||||
public enum FogDistanceMode
|
||||
{
|
||||
/** valid for both fast and fancy qualities. */
|
||||
NEAR,
|
||||
/** valid for both fast and fancy qualities. */
|
||||
FAR,
|
||||
/** only valid if the quality is set to Fancy. */
|
||||
BOTH;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package backsun.lod.util.fog;
|
||||
|
||||
/**
|
||||
* @author James Seibel
|
||||
* @version 09-21-2020
|
||||
*/
|
||||
public enum FogMode
|
||||
{
|
||||
NEAR,
|
||||
FAR,
|
||||
NONE
|
||||
}
|
||||
+4
-2
@@ -1,10 +1,12 @@
|
||||
package backsun.lod.util.fog;
|
||||
|
||||
/**
|
||||
* Unknown, fast, fancy, or off
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 09-21-2020
|
||||
* @version 01-27-2021
|
||||
*/
|
||||
public enum FogType
|
||||
public enum FogQuality
|
||||
{
|
||||
UNKNOWN,
|
||||
FAST,
|
||||
Reference in New Issue
Block a user