Compare commits
4 commits
bb255e3612
...
d3e0ead81e
Author | SHA1 | Date | |
---|---|---|---|
owlsys | d3e0ead81e | ||
owlsys | 52306daa09 | ||
TheKodeToad | 741c60001b | ||
TheKodeToad | c8440cbb53 |
|
@ -15,31 +15,21 @@ public enum Env {
|
||||||
/**
|
/**
|
||||||
* The physical client environment
|
* The physical client environment
|
||||||
*/
|
*/
|
||||||
CLIENT("CLIENT", "client"),
|
CLIENT("client"),
|
||||||
/**
|
/**
|
||||||
* The physical (dedicated) server environment
|
* The physical (dedicated) server environment
|
||||||
*/
|
*/
|
||||||
SERVER("SERVER", "server")
|
SERVER("server");
|
||||||
;
|
|
||||||
|
|
||||||
private final String mixinName, identifier;
|
private final String id;
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
* Get this environment's identifier
|
||||||
*
|
*
|
||||||
* @return This environment's identifier
|
* @return This environment's identifier
|
||||||
*/
|
*/
|
||||||
public String getIdentifier() {
|
public String getId() {
|
||||||
return this.identifier;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class FrogMixinService implements IMixinService, IClassProvider, IClassBy
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSideName() {
|
public String getSideName() {
|
||||||
return FrogLauncher.getInstance().getEnv().getMixinName();
|
return FrogLauncher.getInstance().getEnv().name();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class MinecraftGamePlugin implements GamePlugin {
|
||||||
}
|
}
|
||||||
try (FileSystem fs = FileSystems.newFileSystem(jar)) {
|
try (FileSystem fs = FileSystems.newFileSystem(jar)) {
|
||||||
for (String n : MINECRAFT_CLASSES) {
|
for (String n : MINECRAFT_CLASSES) {
|
||||||
if (Files.exists(fs.getPath(n)) && n.contains(FrogLoaderImpl.getInstance().getEnv().getIdentifier())) {
|
if (Files.exists(fs.getPath(n)) && n.contains(FrogLoaderImpl.getInstance().getEnv().getId())) {
|
||||||
LOGGER.info("Found game: {}", jar);
|
LOGGER.info("Found game: {}", jar);
|
||||||
foundMainClass = n.substring(0, n.length() - 6).replace("/", ".");
|
foundMainClass = n.substring(0, n.length() - 6).replace("/", ".");
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue