Fix some issues someone was having with nixos (#1647)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2026-04-05 16:21:58 -07:00
1 parent 7e1beadfb5
commit bdc4431760
2 files changed
+10 -4

No files matched your search

@@ -142,8 +142,12 @@ public abstract class MixinForgeHooksClient_CoreProfile {
private static void angelica$reportContextFailure(Exception e) {
LOGGER.error("FATAL: Failed to create OpenGL core profile context.");
LOGGER.error("Error: {}", e != null ? e.getMessage() : "unknown");
try {
LOGGER.error("GPU: {}, Driver: {}", GLStateManager.glGetString(GL11.GL_RENDERER), GLStateManager.glGetString(GL11.GL_VERSION));
} catch (Exception ignored) {}
if (Display.isCreated()) {
try {
LOGGER.error("GPU: {}, Driver: {}", GLStateManager.glGetString(GL11.GL_RENDERER), GLStateManager.glGetString(GL11.GL_VERSION));
} catch (Exception ignored) {}
} else {
LOGGER.error("GPU info: not available (no GL context)");
}
}
}
@@ -4,6 +4,7 @@ import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager;
import com.gtnewhorizons.angelica.glsm.ITessellatorData;
import com.gtnewhorizons.angelica.glsm.streaming.TessellatorStreamingDrawer;
import net.minecraft.client.renderer.Tessellator;
import org.spongepowered.asm.mixin.Intrinsic;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
@@ -28,7 +29,8 @@ public class MixinTessellator_CoreProfile implements ITessellatorData {
@Shadow public boolean hasNormals;
@Shadow public boolean hasBrightness;
@Shadow public void reset() {}
@Intrinsic
@Override public void reset() {}
@Inject(method = "draw", at = @At("HEAD"), cancellable = true)
private void angelica$coreProfileDraw(CallbackInfoReturnable<Integer> cir) {