Skip to content

Commit fd56ef2

Browse files
committed
fix: Better compatibility with SwanSong
1 parent 17d14f4 commit fd56ef2

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

  • src/main/java/com/falsepattern/rple/internal

src/main/java/com/falsepattern/rple/internal/Compat.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import com.ventooth.swansong.pbr.PBRTextureEngine;
3030
import cpw.mods.fml.relauncher.Side;
3131
import cpw.mods.fml.relauncher.SideOnly;
32+
33+
import com.ventooth.swansong.shader.ShaderEngine;
3234
import lombok.experimental.UtilityClass;
3335
import lombok.var;
3436
import makamys.neodymium.Neodymium;
@@ -84,7 +86,11 @@ public static boolean neodymiumActive() {
8486

8587
@SideOnly(Side.CLIENT)
8688
public static boolean shadersEnabled() {
87-
return IS_SWANSONG_PRESENT;
89+
if (IS_SWANSONG_PRESENT) {
90+
return SwanSongCompat.initialized();
91+
} else {
92+
return false;
93+
}
8894
}
8995

9096
@SideOnly(Side.CLIENT)
@@ -104,5 +110,9 @@ private static class SwanSongCompat {
104110
public static void isDefaultTexUnit(boolean toggle) {
105111
PBRTextureEngine.isDefaultTexUnit(toggle);
106112
}
113+
114+
public static boolean initialized() {
115+
return ShaderEngine.isInitialized();
116+
}
107117
}
108118
}

0 commit comments

Comments
 (0)