Compare commits

..

No commits in common. "d3e0ead81e35548afe9f20e7e7bc61e171def5eb" and "bb255e36121cfc846acdcd654da1b613847ea065" have entirely different histories.

3 changed files with 17 additions and 7 deletions

View file

@ -15,21 +15,31 @@ public enum Env {
/**
* The physical client environment
*/
CLIENT("client"),
CLIENT("CLIENT", "client"),
/**
* The physical (dedicated) server environment
*/
SERVER("server");
SERVER("SERVER", "server")
;
private final String id;
private final String mixinName, identifier;
/**
* Get this environment's name, in the format Mixin understands.
*
* @return This environment's mixin name
*/
public String getMixinName() {
return this.mixinName;
}
/**
* Get this environment's identifier
*
* @return This environment's identifier
*/
public String getId() {
return this.id;
public String getIdentifier() {
return this.identifier;
}
/**

View file

@ -120,7 +120,7 @@ public class FrogMixinService implements IMixinService, IClassProvider, IClassBy
@Override
public String getSideName() {
return FrogLauncher.getInstance().getEnv().name();
return FrogLauncher.getInstance().getEnv().getMixinName();
}
@Override

View file

@ -53,7 +53,7 @@ public class MinecraftGamePlugin implements GamePlugin {
}
try (FileSystem fs = FileSystems.newFileSystem(jar)) {
for (String n : MINECRAFT_CLASSES) {
if (Files.exists(fs.getPath(n)) && n.contains(FrogLoaderImpl.getInstance().getEnv().getId())) {
if (Files.exists(fs.getPath(n)) && n.contains(FrogLoaderImpl.getInstance().getEnv().getIdentifier())) {
LOGGER.info("Found game: {}", jar);
foundMainClass = n.substring(0, n.length() - 6).replace("/", ".");
try {