Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Disable render region checker
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed May 5, 2020
1 parent 95bb7e1 commit 597daea
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/main/java/me/modmuss50/optifabric/mixin/MixinScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ public class MixinScreen extends DrawableHelper {

@Inject(method = "render", at = @At("RETURN"), remap = false)
private void render(int int_1, int int_2, float float_1, CallbackInfo ci){
if(RENDER_REGIONS == null){
try {
Field field = Option.class.getDeclaredField("RENDER_REGIONS");
RENDER_REGIONS = (CyclingOption) field.get(null);
} catch (NoSuchFieldException | IllegalAccessException e) {
throw new RuntimeException(e);
}

}
boolean enabled = RENDER_REGIONS.getMessage(MinecraftClient.getInstance().options).endsWith("ON");
if(enabled){
drawString(font, "OptiFabric: Render Regions is not supported!", 10, 5, Color.RED.getRGB());
}
// if(RENDER_REGIONS == null){
// try {
// Field field = Option.class.getDeclaredField("RENDER_REGIONS");
// RENDER_REGIONS = (CyclingOption) field.get(null);
// } catch (NoSuchFieldException | IllegalAccessException e) {
// throw new RuntimeException(e);
// }
//
// }
// boolean enabled = RENDER_REGIONS.getMessage(MinecraftClient.getInstance().options).endsWith("ON");
// if(enabled){
// drawString(font, "OptiFabric: Render Regions is not supported!", 10, 5, Color.RED.getRGB());
// }
}

}

0 comments on commit 597daea

Please sign in to comment.