Polymer

Polymer

763k Downloads

Client Cannot Generate RP on Windows

aws404 opened this issue ยท 2 comments

commented

As URL.getPath() returns the path with a preceding /, and Path.of(String) is not equipped to handle this, the client throws the error:
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/aws404/.../....
This should be able to be fixed by changing DefaultRPBuilder.buildResourcePack() (Line 250) from:

String clientFile = MinecraftServer.class.getProtectionDomain().getCodeSource().getLocation().getPath();
clientJarPath = Path.of(clientFile);

to:

URI clientFile = MinecraftServer.class.getProtectionDomain().getCodeSource().getLocation().toURI();
clientJarPath = Path.of(clientFile);

as keeping it in URI format does not require re-parsing the file path.

commented

Interesting, going to change that.

commented

Should be fixed in 0.2.0-beta.3+1.18-pre8