diff options
| author | DoKM <mcazzyman@gmail.com> | 2021-08-04 11:29:08 +0200 |
|---|---|---|
| committer | DoKM <mcazzyman@gmail.com> | 2021-08-04 11:29:08 +0200 |
| commit | c4dc513754fa99c424a86768226fcbcdfa4bc8ce (patch) | |
| tree | 2402f5809c8d0fbfcc4add8402b6189d826473ae /src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java | |
| parent | 3ccbd6bb51f781d8c18d0389e5d8e79391b7c56c (diff) | |
| download | notenoughupdates-c4dc513754fa99c424a86768226fcbcdfa4bc8ce.tar.gz notenoughupdates-c4dc513754fa99c424a86768226fcbcdfa4bc8ce.tar.bz2 notenoughupdates-c4dc513754fa99c424a86768226fcbcdfa4bc8ce.zip | |
Fix fastrender check and add fast render warning to storage overlay
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index 3b78c2c9..7c807cf4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -609,21 +609,10 @@ public class NotEnoughUpdates { SimpleCommand.ProcessCommandRunnable viewProfileRunnable = new SimpleCommand.ProcessCommandRunnable() { public void processCommand(ICommandSender sender, String[] args) { - if(Loader.isModLoaded("optifine") && - new File(Minecraft.getMinecraft().mcDataDir, "optionsof.txt").exists()) { - try(InputStream in = new FileInputStream(new File(Minecraft.getMinecraft().mcDataDir, "optionsof.txt"))) { - BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)); - - String line; - while((line = reader.readLine()) != null) { - if(line.contains("ofFastRender:true")) { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + - "Some parts of the profile viewer do not work with OF Fast Render. Go to Video > Performance to disable it.")); - break; - } - } - } catch(Exception e) { - } + if(!OpenGlHelper.isFramebufferEnabled()) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + + "Some parts of the profile viewer do not work with OF Fast Render. Go to Video > Performance to disable it.")); + } if (config.apiKey.apiKey == null || config.apiKey.apiKey.trim().isEmpty()) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + @@ -1046,21 +1035,10 @@ public class NotEnoughUpdates { SimpleCommand cosmeticsCommand = new SimpleCommand("neucosmetics", new SimpleCommand.ProcessCommandRunnable() { public void processCommand(ICommandSender sender, String[] args) { - if(Loader.isModLoaded("optifine") && - new File(Minecraft.getMinecraft().mcDataDir, "optionsof.txt").exists()) { - try(InputStream in = new FileInputStream(new File(Minecraft.getMinecraft().mcDataDir, "optionsof.txt"))) { - BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)); - - String line; - while((line = reader.readLine()) != null) { - if(line.contains("ofFastRender:true")) { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + - "NEU cosmetics do not work with OF Fast Render. Go to Video > Performance to disable it.")); - return; - } - } - } catch(Exception e) { - } + if(!OpenGlHelper.isFramebufferEnabled()) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + + "NEU cosmetics do not work with OF Fast Render. Go to Video > Performance to disable it.")); + } openGui = new GuiCosmetics(); |
