mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
load app using apploader -- no more black screen on app load
This commit is contained in:
@@ -43,10 +43,15 @@ object JsonFetcher {
|
||||
return jsonObj
|
||||
}
|
||||
|
||||
@Throws(java.io.IOException::class)
|
||||
private fun readJsonFileAsString(path: String) {
|
||||
java.nio.file.Files.lines(java.nio.file.FileSystems.getDefault().getPath(path)).forEach(
|
||||
{ net.torvald.terrarum.utils.JsonFetcher.jsonString!!.append(it) }
|
||||
) // JSON does not require line break
|
||||
try {
|
||||
java.nio.file.Files.lines(java.nio.file.FileSystems.getDefault().getPath(path)).forEach(
|
||||
{ net.torvald.terrarum.utils.JsonFetcher.jsonString!!.append(it) }
|
||||
) // JSON does not require line break
|
||||
}
|
||||
catch (e: IOException) {
|
||||
System.err.println("An error occurred while reading $path")
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user