Use the full package name of FabricLauncherBase instead of importing it, to avoid another deprecation warning
This commit is contained in:
parent
72e118d45a
commit
3a0dfb176d
|
@ -8,7 +8,6 @@ import net.fabricmc.api.ClientModInitializer
|
|||
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback
|
||||
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback.EVENT
|
||||
import net.fabricmc.loader.api.FabricLoader
|
||||
import net.fabricmc.loader.launch.common.FabricLauncherBase
|
||||
import kotlin.io.path.exists
|
||||
import kotlin.io.path.isDirectory
|
||||
import kotlin.io.path.listDirectoryEntries
|
||||
|
@ -32,7 +31,7 @@ class FabricInit: Snowy(), ClientModInitializer {
|
|||
val classSet = mutableSetOf<Class<out ButtonImpl>>()
|
||||
buttonsDirectory.run {
|
||||
listDirectoryEntries("*.class").forEach { file ->
|
||||
@Suppress("DEPRECATION")
|
||||
@Suppress("DEPRECATION") net.fabricmc.loader.launch.common.
|
||||
FabricLauncherBase.getClass(file.pathString.drop(1).replace('/', '.').removeSuffix(".class")).let { foundClass ->
|
||||
if (foundClass.isValidForButtonCollection()) classSet.add(foundClass.asSubclass(ButtonImpl::class.java))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue