Suppress a deprecation warning in FabricInit.kt
This commit is contained in:
parent
9f8d48b75d
commit
e9bd039317
|
@ -32,8 +32,10 @@ class FabricInit: Snowy(), ClientModInitializer {
|
||||||
val classSet = mutableSetOf<Class<out ButtonImpl>>()
|
val classSet = mutableSetOf<Class<out ButtonImpl>>()
|
||||||
buttonsDirectory.run {
|
buttonsDirectory.run {
|
||||||
listDirectoryEntries("*.class").forEach { file ->
|
listDirectoryEntries("*.class").forEach { file ->
|
||||||
val foundClass = FabricLauncherBase.getClass(file.pathString.drop(1).replace('/', '.').removeSuffix(".class"))
|
@Suppress("DEPRECATION")
|
||||||
if (foundClass.isValidForButtonCollection()) classSet.add(foundClass.asSubclass(ButtonImpl::class.java))
|
FabricLauncherBase.getClass(file.pathString.drop(1).replace('/', '.').removeSuffix(".class")).let { foundClass ->
|
||||||
|
if (foundClass.isValidForButtonCollection()) classSet.add(foundClass.asSubclass(ButtonImpl::class.java))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
classSet
|
classSet
|
||||||
|
|
Loading…
Reference in New Issue