Skip to content

Commit

Permalink
Use .jlib in mods folder - won't be incorrectly loaded by forge as no…
Browse files Browse the repository at this point in the history
…t a .jar, still works.
  • Loading branch information
LunNova committed Feb 8, 2016
1 parent 7056884 commit 3a181a0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/me/nallar/modpatcher/ModPatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public class ModPatcher {
private static final int API_VERSION = 0;
private static final Logger log = LogManager.getLogger("ModPatcher");
private static final String mcVersion = "@MC_VERSION@";
private static final Path neverUpdatePath = realPath("ModPatcher/NEVER_UPDATE.txt");
private static final Path modPatcherPath = realPath("ModPatcher/ModPatcher.jar");
private static final Path neverUpdatePath = realPath("mods/ModPatcher_NEVER_UPDATE.txt");
private static final Path modPatcherPath = realPath("mods/ModPatcher.jlib");
private static final Future<Boolean> defaultUpdateRequired = CompletableFuture.completedFuture(!Files.exists(modPatcherPath));
private static final String DOWNLOAD_URL_PROPERTY = "modpatcher.downloadUrl";
private static final String REQUIRED_VERSION_PROPERTY = "modpatcher.requiredVersion";
Expand Down Expand Up @@ -210,7 +210,7 @@ private static void addToCurrentClassLoader() {

try {
final URL url = modPatcherPath.toUri().toURL();
log.info("Adding " + url + " to LCL");
log.trace("Adding " + url + " to classloader");
if (cl instanceof LaunchClassLoader) {
LaunchClassLoader lcl = (LaunchClassLoader) cl;
lcl.addTransformerExclusion(MODPATCHER_PACKAGE);
Expand All @@ -233,8 +233,6 @@ private static void addToCurrentClassLoader() {
}

private static boolean removeModPatcherEntries(String entry) {
log.trace("Entry: " + entry);

return entry.replace('/', '.').startsWith(MODPATCHER_PACKAGE);
}

Expand Down

0 comments on commit 3a181a0

Please sign in to comment.