mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
Merge branch 'master-MC1.7.10' of github.com:MightyPirates/OpenComputers into master-MC1.8
Conflicts: src/main/scala/li/cil/oc/common/Proxy.scala
This commit is contained in:
commit
92c3ffc1e7
@ -18,6 +18,7 @@ import li.cil.oc.server.machine.luaj.LuaJLuaArchitecture
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.item.Item
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraftforge.fml.common.FMLLog
|
||||
import net.minecraftforge.fml.common.event._
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry
|
||||
@ -28,6 +29,8 @@ import scala.collection.convert.WrapAsScala._
|
||||
|
||||
class Proxy {
|
||||
def preInit(e: FMLPreInitializationEvent) {
|
||||
checkForBrokenJavaVersion()
|
||||
|
||||
Settings.load(new File(e.getModConfigurationDirectory, "opencomputers" + File.separator + "settings.conf"))
|
||||
|
||||
OpenComputers.log.info("Initializing blocks and items.")
|
||||
@ -149,4 +152,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