Skip to content

Commit

Permalink
Resolver changes
Browse files Browse the repository at this point in the history
- Modified ResConfHack to read resolv data from the Java property
- Added auto-unpacking of premade resolv.conf and setting the Java property
(Now SRV resolving should work on Java 17 by default)
  • Loading branch information
artdeell committed Aug 31, 2021
1 parent de50fd9 commit dc479a2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Binary file not shown.
2 changes: 2 additions & 0 deletions app_pojavlauncher/src/main/assets/resolv.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nameserver 8.8.8.8
nameserver 8.8.4.4
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ private void initMain() throws Throwable {
Tools.copyAssetFile(this, "options.txt", Tools.DIR_GAME_NEW, false);
// TODO: Remove after implement.
Tools.copyAssetFile(this, "launcher_profiles.json", Tools.DIR_GAME_NEW, false);

Tools.copyAssetFile(this,"resolv.conf",Tools.DIR_DATA, true);
AssetManager am = this.getAssets();

unpackComponent(am, "caciocavallo");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ public static List<String> getJavaArgs(Context ctx) {
"-Dglfwstub.windowHeight=" + CallbackBridge.windowHeight,
"-Dglfwstub.initEgl=false",

"-Dext.net.resolvPath=" +new File(Tools.DIR_DATA,"resolv.conf").getAbsolutePath(),

"-Dnet.minecraft.clientmodname=" + Tools.APP_NAME,
"-Dfml.earlyprogresswindow=false" //Forge 1.14+ workaround
};
Expand Down

0 comments on commit dc479a2

Please sign in to comment.