Merge branch '1.9.4' into 1.10.2
e20dfa6Merge branch '1.8' into 1.9.4682fb4bDownload OpenEye via http because of outdated java versions0c48d6aMake ShaderReflection init fail fast, not printing out unneeded exceptions
This commit is contained in:
@@ -23,80 +23,31 @@ public class ShaderReflection {
|
|||||||
public static Method config_isShaders;
|
public static Method config_isShaders;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
initFrameTimeCounter();
|
|
||||||
|
|
||||||
initIsShadowPass();
|
|
||||||
|
|
||||||
initBeginRender();
|
|
||||||
|
|
||||||
initChunksToUpdateForced();
|
|
||||||
|
|
||||||
initConfigIsShaders();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void initFrameTimeCounter() {
|
|
||||||
try {
|
try {
|
||||||
shaders_frameTimeCounter = Class.forName("shadersmod.client.Shaders")
|
shaders_frameTimeCounter = Class.forName("shadersmod.client.Shaders")
|
||||||
.getDeclaredField("frameTimeCounter");
|
.getDeclaredField("frameTimeCounter");
|
||||||
shaders_frameTimeCounter.setAccessible(true);
|
shaders_frameTimeCounter.setAccessible(true);
|
||||||
} catch (ClassNotFoundException ignore) {
|
|
||||||
// no shaders mod installed
|
|
||||||
} catch (NoSuchFieldException e) {
|
|
||||||
// the field wasn't found. Has it been renamed?
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void initIsShadowPass() {
|
|
||||||
try {
|
|
||||||
shaders_isShadowPass = Class.forName("shadersmod.client.Shaders")
|
shaders_isShadowPass = Class.forName("shadersmod.client.Shaders")
|
||||||
.getDeclaredField("isShadowPass");
|
.getDeclaredField("isShadowPass");
|
||||||
shaders_isShadowPass.setAccessible(true);
|
shaders_isShadowPass.setAccessible(true);
|
||||||
} catch (ClassNotFoundException ignore) {
|
|
||||||
// no shaders mod installed
|
|
||||||
} catch (NoSuchFieldException e) {
|
|
||||||
// the field wasn't found. Has it been renamed?
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void initBeginRender() {
|
|
||||||
try {
|
|
||||||
shaders_beginRender = Class.forName("shadersmod.client.Shaders")
|
shaders_beginRender = Class.forName("shadersmod.client.Shaders")
|
||||||
.getDeclaredMethod("beginRender", Minecraft.class, float.class, long.class);
|
.getDeclaredMethod("beginRender", Minecraft.class, float.class, long.class);
|
||||||
shaders_frameTimeCounter.setAccessible(true);
|
shaders_beginRender.setAccessible(true);
|
||||||
} catch (ClassNotFoundException ignore) {
|
|
||||||
// no shaders mod installed
|
|
||||||
} catch (NoSuchMethodException e) {
|
|
||||||
// the method wasn't found. Has it been renamed?
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void initChunksToUpdateForced() {
|
|
||||||
try {
|
|
||||||
renderGlobal_chunksToUpdateForced = Class.forName("net.minecraft.client.renderer.RenderGlobal")
|
renderGlobal_chunksToUpdateForced = Class.forName("net.minecraft.client.renderer.RenderGlobal")
|
||||||
.getDeclaredField("chunksToUpdateForced");
|
.getDeclaredField("chunksToUpdateForced");
|
||||||
renderGlobal_chunksToUpdateForced.setAccessible(true);
|
renderGlobal_chunksToUpdateForced.setAccessible(true);
|
||||||
} catch (ClassNotFoundException ignore) {
|
|
||||||
// no shaders mod installed
|
|
||||||
} catch (NoSuchFieldException e) {
|
|
||||||
// the field wasn't found. Has it been renamed?
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void initConfigIsShaders() {
|
|
||||||
try {
|
|
||||||
config_isShaders = Class.forName("Config")
|
config_isShaders = Class.forName("Config")
|
||||||
.getDeclaredMethod("isShaders");
|
.getDeclaredMethod("isShaders");
|
||||||
config_isShaders.setAccessible(true);
|
config_isShaders.setAccessible(true);
|
||||||
} catch (ClassNotFoundException ignore) {
|
} catch (ClassNotFoundException ignore) {
|
||||||
// no shaders mod installed
|
// no shaders mod installed
|
||||||
} catch (NoSuchMethodException e) {
|
} catch (NoSuchMethodException | NoSuchFieldException e) {
|
||||||
// the method wasn't found. Has it been renamed?
|
// the method wasn't found. Has it been renamed?
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import java.nio.channels.FileChannel;
|
|||||||
import java.nio.channels.ReadableByteChannel;
|
import java.nio.channels.ReadableByteChannel;
|
||||||
|
|
||||||
public class OpenEyeExtra implements Extra {
|
public class OpenEyeExtra implements Extra {
|
||||||
private static final String DOWNLOAD_URL = "https://www.replaymod.com/dl/openeye/" + Loader.MC_VERSION;
|
private static final String DOWNLOAD_URL = "http://www.replaymod.com/dl/openeye/" + Loader.MC_VERSION;
|
||||||
private static final Setting<Boolean> ASK_FOR_OPEN_EYE = new Setting<>("advanced", "askForOpenEye", null, true);
|
private static final Setting<Boolean> ASK_FOR_OPEN_EYE = new Setting<>("advanced", "askForOpenEye", null, true);
|
||||||
|
|
||||||
private ReplayMod mod;
|
private ReplayMod mod;
|
||||||
|
|||||||
Reference in New Issue
Block a user