Class MinecraftOptiFine
java.lang.Object
lol.trq.helios.minecraft.MinecraftOptiFine
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether Fast Render is on.booleanfastRender(boolean on) Sets Fast Render for this session; OptiFine saves it with its options.booleanpresent()Returns whether OptiFine is installed.version()Returns OptiFine's version, such asOptiFine_1.8.9_HD_U_M5.
-
Constructor Details
-
MinecraftOptiFine
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
Returns OptiFine's version, such asOptiFine_1.8.9_HD_U_M5.- Returns:
- the version, or
nullwithout 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
-