mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-12 08:27:39 +00:00
Add display list compilation/optimization (#1141)
This commit is contained in:
1 parent
55811b9d7b
commit
33de1de9c4
118 files changed
+11342
-670
No files matched your search
@@ -71,6 +71,9 @@ public class Iris {
|
||||
|
||||
public static final IrisLogging logger = new IrisLogging(MODNAME);
|
||||
|
||||
// Cached at class load - config must be loaded before Iris. Do not change at runtime.
|
||||
public static final boolean enabled = AngelicaConfig.enableIris;
|
||||
|
||||
private static Path shaderpacksDirectory;
|
||||
private static ShaderpackDirectoryManager shaderpacksDirectoryManager;
|
||||
|
||||
@@ -103,7 +106,9 @@ public class Iris {
|
||||
public static Iris INSTANCE = new Iris();
|
||||
|
||||
private Iris() {
|
||||
isDevelopmentEnvironment = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
|
||||
// Guard against null blackboard in test environments
|
||||
final Object deobfEnv = Launch.blackboard != null ? Launch.blackboard.get("fml.deobfuscatedEnvironment") : null;
|
||||
isDevelopmentEnvironment = deobfEnv != null && (boolean) deobfEnv;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@@ -663,7 +668,7 @@ public class Iris {
|
||||
}
|
||||
|
||||
public static void setShaderMaterialOverride(Block block, int meta) {
|
||||
if (!AngelicaConfig.enableIris)
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
int blockId = getShaderMaterialOverrideId(block, meta);
|
||||
@@ -673,7 +678,7 @@ public class Iris {
|
||||
}
|
||||
|
||||
public static void resetShaderMaterialOverride() {
|
||||
if (!AngelicaConfig.enableIris)
|
||||
if (!enabled)
|
||||
return;
|
||||
if (TessellatorManager.get() instanceof CapturingTessellator tess)
|
||||
tess.setShaderBlockId(-1);
|
||||
|
||||
Reference in new issue
Block a user