ソースを参照

Migrate to ArchitecturyTarget

shedaniel 4 年 前
コミット
ce6fda2a2f

+ 2 - 2
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

+ 2 - 1
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 {