From 475c79fc676506d22a3caaf59ce902785afd0e31 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Mon, 18 Jan 2021 13:39:47 +0800 Subject: [PATCH] Not fail with 0.6 loom --- .../kotlin/me/shedaniel/architect/plugin/TransformTask.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/me/shedaniel/architect/plugin/TransformTask.kt b/src/main/kotlin/me/shedaniel/architect/plugin/TransformTask.kt index 041dfb2..bdce705 100644 --- a/src/main/kotlin/me/shedaniel/architect/plugin/TransformTask.kt +++ b/src/main/kotlin/me/shedaniel/architect/plugin/TransformTask.kt @@ -87,9 +87,11 @@ open class TransformTask : Jar() { runCatching { refmapHelperClass = Class.forName("net.fabricmc.loom.util.MixinRefmapHelper") }.onFailure { - refmapHelperClass = Class.forName("net.fabricmc.loom.build.MixinRefmapHelper") - }.onFailure { - throw ClassNotFoundException("Failed to find MixinRefmapHelper!") + runCatching { + refmapHelperClass = Class.forName("net.fabricmc.loom.build.MixinRefmapHelper") + }.onFailure { + throw ClassNotFoundException("Failed to find MixinRefmapHelper!") + } } val method = refmapHelperClass!!.getDeclaredMethod(