Fixed xray opengl context error when changing xray.opacity
@@ -35,6 +35,11 @@ public class XrayMod extends ToggleMod {
public void reloadRenderers() {
if(MC.renderGlobal != null) {
+ if (MC.isCallingFromMinecraftThread())
+ MC.addScheduledTask(() -> {
+ MC.renderGlobal.loadRenderers();
+ });
+ else
MC.renderGlobal.loadRenderers();
}
}
