From 3a0dfb176d5eaeb15ecf75551506e020a0fb3543 Mon Sep 17 00:00:00 2001 From: Username404 Date: Fri, 10 Dec 2021 20:21:56 +0100 Subject: [PATCH] Use the full package name of FabricLauncherBase instead of importing it, to avoid another deprecation warning --- .../main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt index 4cc99f2..59fb24f 100644 --- a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt +++ b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt @@ -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>() 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)) }