This repository has been archived by the owner on Jan 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make class loading priorities more robust, improve class redefinition
- Loading branch information
Showing
9 changed files
with
86 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/java/link/infra/jumploader/specialcases/ClasspathModifier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package link.infra.jumploader.specialcases; | ||
|
||
public interface ClasspathModifier extends SpecialCase { | ||
void modifyClasspath(); | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/link/infra/jumploader/specialcases/ForgeJarClasspathModifier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package link.infra.jumploader.specialcases; | ||
|
||
import link.infra.jumploader.resources.ParsedArguments; | ||
import link.infra.jumploader.util.ClasspathUtil; | ||
|
||
import java.net.URL; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class ForgeJarClasspathModifier implements ClasspathModifier { | ||
@Override | ||
public boolean shouldApply(List<URL> loadedJars, String mainClass, ParsedArguments gameArguments) { | ||
// Always applies - if you're having problems this you should probably load the | ||
// class through Jumploader rather than in the classpath | ||
return true; | ||
} | ||
|
||
@Override | ||
public void modifyClasspath() { | ||
// If a JAR contains the Minecraft Main classes, remove it from the classpath - so Fabric doesn't see it and think the remapper needs to use it | ||
ClasspathUtil.removeMatchingClasses(Arrays.asList("net.minecraft.client.main.Main", "net.minecraft.server.MinecraftServer")); | ||
} | ||
} |
10 changes: 0 additions & 10 deletions
10
src/main/java/link/infra/jumploader/specialcases/JarResourcePriorityModifier.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 0 additions & 50 deletions
50
src/main/java/link/infra/jumploader/specialcases/UnpatchedGameResourcePriorityModifier.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters