Class MinecraftOptiFine

java.lang.Object
lol.trq.helios.minecraft.MinecraftOptiFine

public final class MinecraftOptiFine extends Object
OptiFine, when it is installed, by reflection: whether it is present, its version, and its Fast Render option. OptiFine is never a dependency; every method falls back to a safe answer without it. Helios's own drawing works with Fast Render on or off, so nothing needs to turn it off; the switch is here for callers whose own drawing does.
  • Constructor Details

    • MinecraftOptiFine

      public MinecraftOptiFine(ClassLoader loader)
      Looks OptiFine up once.
      Parameters:
      loader - the class loader Minecraft's classes load through
  • Method Details

    • present

      public boolean present()
      Returns whether OptiFine is installed.
      Returns:
      true with OptiFine
    • version

      public String version()
      Returns OptiFine's version, such as OptiFine_1.8.9_HD_U_M5.
      Returns:
      the version, or null without OptiFine
    • fastRender

      public boolean fastRender()
      Returns whether Fast Render is on.
      Returns:
      the option, or false without OptiFine
    • fastRender

      public boolean fastRender(boolean on)
      Sets Fast Render for this session; OptiFine saves it with its options. Does nothing without OptiFine.
      Parameters:
      on - whether Fast Render is on
      Returns:
      whether the option exists and was set