diff --git a/launchwrapper-fabric/src/main/java/org/mcphackers/launchwrapper/inject/LWGameProvider.java b/launchwrapper-fabric/src/main/java/org/mcphackers/launchwrapper/inject/LWGameProvider.java index 72193d3..f6302cb 100644 --- a/launchwrapper-fabric/src/main/java/org/mcphackers/launchwrapper/inject/LWGameProvider.java +++ b/launchwrapper-fabric/src/main/java/org/mcphackers/launchwrapper/inject/LWGameProvider.java @@ -102,7 +102,8 @@ private Path getLaunchwrapperSource() { @Override public boolean locateGame(FabricLauncher launcher, String[] args) { this.envType = launcher.getEnvironmentType(); - + + String entrypoint = null; try { LibClassifier classifier = new LibClassifier<>(LWLib.class, envType, this); LWLib envGameLib = envType == EnvType.CLIENT ? LWLib.MC_CLIENT : LWLib.MC_SERVER; @@ -115,6 +116,9 @@ public boolean locateGame(FabricLauncher launcher, String[] args) { envGameJar = classifier.getOrigin(envGameLib); if (envGameJar == null) return false; + + entrypoint = classifier.getClassName(envGameLib); + if(entrypoint == null) return false; gameJar = envGameJar; launchwrapperJar = classifier.getOrigin(LWLib.LAUNCHWRAPPER); @@ -142,7 +146,7 @@ public boolean locateGame(FabricLauncher launcher, String[] args) { share.put("fabric-loader:inputGameJar", gameJar); // deprecated share.put("fabric-loader:inputGameJars", Collections.singleton(gameJar)); - versionData = McVersionLookup.getVersion(Collections.singletonList(gameJar), "net.minecraft.client.Minecraft", config.version.get()); + versionData = McVersionLookup.getVersion(Collections.singletonList(gameJar), entrypoint, config.version.get()); return true; }