Clear warnings
This commit is contained in:
@@ -24,13 +24,10 @@ import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipFile
|
||||
import java.io.File
|
||||
|
||||
private fun lessThan32(b: ByteArray, x: Int): Int {
|
||||
var x = x
|
||||
while (x < b.size) {
|
||||
if (b[x] < 32)
|
||||
return x
|
||||
x++
|
||||
}
|
||||
private fun lessThan32(b: ByteArray, startIndex: Int): Int {
|
||||
for (i in startIndex until b.size)
|
||||
if (b[i] < 32)
|
||||
return i
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class ModInfo (
|
||||
val file = if (modFile.extension == DISABLED_EXTENSION)
|
||||
modFile.absoluteFile.parentFile.resolve(modFile.nameWithoutExtension)
|
||||
else modFile
|
||||
var description = "Unrecognized mod file"
|
||||
val description: String
|
||||
if (file.extension == "zip" || file.extension == "jar")
|
||||
try {
|
||||
return ForgeModMetadata.fromFile(modFile)
|
||||
|
||||
@@ -113,6 +113,7 @@ abstract class Task {
|
||||
}
|
||||
|
||||
fun executor() = TaskExecutor().submit(this)
|
||||
fun executor(taskListener: TaskListener) = TaskExecutor().submit(this).apply { this.taskListener = taskListener }
|
||||
|
||||
fun subscribe(subscriber: Task) = executor().apply {
|
||||
submit(subscriber).start()
|
||||
|
||||
Reference in New Issue
Block a user