From ce6fda2a2fe7053b84fbe4faba4be220ebbc8253 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Wed, 13 Jan 2021 01:12:47 +0800 Subject: [PATCH] Migrate to ArchitecturyTarget --- build.gradle | 4 ++-- .../main/java/me/shedaniel/architectury/PlatformMethods.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index f102c636..3d3517c5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { - id "architectury-plugin" version "1.3.45" - id "forgified-fabric-loom" version "0.5.28" apply false + id "architectury-plugin" version "1.3.47" + id "forgified-fabric-loom" version "0.5.29" apply false id "org.cadixdev.licenser" version "0.5.0" id "com.jfrog.bintray" version "1.8.4" id "com.matthewprenger.cursegradle" version "1.4.0" apply false diff --git a/common/src/main/java/me/shedaniel/architectury/PlatformMethods.java b/common/src/main/java/me/shedaniel/architectury/PlatformMethods.java index d857ec9b..0f42b194 100644 --- a/common/src/main/java/me/shedaniel/architectury/PlatformMethods.java +++ b/common/src/main/java/me/shedaniel/architectury/PlatformMethods.java @@ -19,6 +19,7 @@ package me.shedaniel.architectury; +import me.shedaniel.architectury.targets.ArchitecturyTarget; import me.shedaniel.architectury.utils.PlatformExpectedError; import org.jetbrains.annotations.ApiStatus; @@ -30,7 +31,7 @@ public class PlatformMethods { Class lookupClass = lookup.lookupClass(); String lookupType = lookupClass.getName().replace("$", "") + "Impl"; - String platformExpectedClass = lookupType.substring(0, lookupType.lastIndexOf('.')) + "." + Architectury.getModLoader() + "." + + String platformExpectedClass = lookupType.substring(0, lookupType.lastIndexOf('.')) + "." + ArchitecturyTarget.getCurrentTarget() + "." + lookupType.substring(lookupType.lastIndexOf('.') + 1); Class newClass; try {