From 289dd93f444070f1b3ed907fb66a800ba5f5c767 Mon Sep 17 00:00:00 2001 From: ev chang Date: Wed, 19 Jun 2024 08:39:57 +0700 Subject: [PATCH] fix conflicts with optifine --- build.gradle.kts | 2 ++ .../org/polyfrost/redaction/plugin/RedactionMixinPlugin.kt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index d8b2571..76719c8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -156,6 +156,8 @@ tasks { ) ) } + + rename("(.+_at.cfg)", "META-INF/$1") } // Configures the resources to include if we are building for forge or fabric. diff --git a/src/main/kotlin/org/polyfrost/redaction/plugin/RedactionMixinPlugin.kt b/src/main/kotlin/org/polyfrost/redaction/plugin/RedactionMixinPlugin.kt index 2477dc1..44ab437 100644 --- a/src/main/kotlin/org/polyfrost/redaction/plugin/RedactionMixinPlugin.kt +++ b/src/main/kotlin/org/polyfrost/redaction/plugin/RedactionMixinPlugin.kt @@ -8,7 +8,7 @@ class RedactionMixinPlugin : IMixinConfigPlugin { private var optifine = false override fun onLoad(mixinPackage: String?) { optifine = try { - Class.forName("Config") + Class.forName("Config", false, javaClass.classLoader) true } catch (e: ClassNotFoundException) { false