Add support for OptifineAccessor, and decrease light issue on forge
This commit is contained in:
@@ -179,6 +179,8 @@ public class LodBuilder
|
||||
if (MC.getWrappedClientWorld() == null)
|
||||
return false;
|
||||
|
||||
if (!chunk.isLightCorrect()) return false;
|
||||
|
||||
// determine how many LODs to generate vertically
|
||||
//VerticalQuality verticalQuality = LodConfig.CLIENT.graphics.qualityOption.verticalQuality.get();
|
||||
region.isWriting++;
|
||||
@@ -209,6 +211,7 @@ public class LodBuilder
|
||||
} finally {
|
||||
region.isWriting--;
|
||||
}
|
||||
|
||||
return true;
|
||||
//executeTime = System.currentTimeMillis() - executeTime;
|
||||
//if (executeTime > 0) ClientApi.LOGGER.info("generateLodNodeFromChunk level: " + detailLevel + " time ms: " + executeTime);
|
||||
|
||||
@@ -46,4 +46,6 @@ public interface IReflectionHandler
|
||||
|
||||
/** @returns if Sodium (or a sodium like) mod is present. Attempts to find the "SodiumWorldRenderer" class. */
|
||||
boolean sodiumPresent();
|
||||
|
||||
boolean optifinePresent();
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ public class ReflectionHandler implements IReflectionHandler
|
||||
private final Object mcOptionsObject;
|
||||
|
||||
private Boolean sodiumPresent = null;
|
||||
private boolean optifinePresent = false;
|
||||
|
||||
|
||||
|
||||
@@ -87,6 +88,7 @@ public class ReflectionHandler implements IReflectionHandler
|
||||
{
|
||||
if (field.getName().equals("ofFogType"))
|
||||
{
|
||||
optifinePresent = true;
|
||||
ofFogField = field;
|
||||
return;
|
||||
}
|
||||
@@ -158,7 +160,11 @@ public class ReflectionHandler implements IReflectionHandler
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean optifinePresent()
|
||||
{
|
||||
return optifinePresent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.seibel.lod.core.wrapperInterfaces.modAccessor;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.seibel.lod.core.wrapperInterfaces.chunk.AbstractChunkPosWrapper;
|
||||
|
||||
public interface IOptifineAccessor extends IModAccessor
|
||||
{
|
||||
// Can be null
|
||||
HashSet<AbstractChunkPosWrapper> getNormalRenderedChunks();
|
||||
}
|
||||
Reference in New Issue
Block a user