mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 09:18:05 -04:00
That's it, I've had enough.
This commit is contained in:
parent
9afe70778b
commit
dc80da8d39
@ -1,6 +1,7 @@
|
||||
package li.cil.oc.common
|
||||
|
||||
import com.google.common.base.Strings
|
||||
import cpw.mods.fml.common.FMLLog
|
||||
import cpw.mods.fml.common.event._
|
||||
import cpw.mods.fml.common.network.NetworkRegistry
|
||||
import cpw.mods.fml.common.registry.EntityRegistry
|
||||
@ -23,6 +24,8 @@ import scala.collection.convert.WrapAsScala._
|
||||
|
||||
class Proxy {
|
||||
def preInit(e: FMLPreInitializationEvent) {
|
||||
checkForBrokenJavaVersion()
|
||||
|
||||
Settings.load(e.getSuggestedConfigurationFile)
|
||||
|
||||
OpenComputers.log.info("Initializing blocks and items.")
|
||||
@ -141,4 +144,18 @@ class Proxy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// OK, seriously now, I've gotten one too many bug reports because of this Java version being broken.
|
||||
|
||||
private final val BrokenJavaVersions = Set("1.6.0_65, Apple Inc.")
|
||||
|
||||
def isBrokenJavaVersion = {
|
||||
val javaVersion = System.getProperty("java.version") + ", " + System.getProperty("java.vendor")
|
||||
BrokenJavaVersions.contains(javaVersion)
|
||||
}
|
||||
|
||||
def checkForBrokenJavaVersion() = if (isBrokenJavaVersion) {
|
||||
FMLLog.bigWarning("You're using a broken Java version! Please update now, or remove OpenComputers. DO NOT REPORT THIS! UPDATE YOUR JAVA!")
|
||||
throw new Exception("You're using a broken Java version! Please update now, or remove OpenComputers. DO NOT REPORT THIS! UPDATE YOUR JAVA!")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user