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>>()
|
||||
buttonsDirectory.run {
|
||||
listDirectoryEntries("*.class").forEach { file ->
|
||||
val foundClass = FabricLauncherBase.getClass(file.pathString.drop(1).replace('/', '.').removeSuffix(".class"))
|
||||
if (foundClass.isValidForButtonCollection()) classSet.add(foundClass.asSubclass(ButtonImpl::class.java))
|
||||
@Suppress("DEPRECATION")
|
||||
FabricLauncherBase.getClass(file.pathString.drop(1).replace('/', '.').removeSuffix(".class")).let { foundClass ->
|
||||
if (foundClass.isValidForButtonCollection()) classSet.add(foundClass.asSubclass(ButtonImpl::class.java))
|
||||
}
|
||||
}
|
||||
}
|
||||
classSet
|
||||
|
|
Loading…
Reference in New Issue