Skip to content

Commit

Permalink
Probably fix Windows issue
Browse files Browse the repository at this point in the history
  • Loading branch information
maestro-denery committed May 3, 2023
1 parent fbe871e commit d52fd72
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion fabric-loader
Submodule fabric-loader updated from cc4a4f to 97fe7d
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mcVersion=1.19

# Toki info
gameVersion=1.19.4
tokiVersion=0.1.2
tokiVersion=0.1.2.1
spigotMappingsRef=177811e1fa90f674897a302820f3ed84e4d65688
mojangMappingsRef=bc44f6dd84cd2f3ad8c0caad850eaca9e82067e3

Expand Down
2 changes: 1 addition & 1 deletion paper-api
Submodule paper-api updated from 68774f to ab1950
2 changes: 1 addition & 1 deletion paper-mojang-api
Submodule paper-mojang-api updated from 0eca6e to 759e11
2 changes: 1 addition & 1 deletion paper-server
Submodule paper-server updated from c93d22 to cc2638
2 changes: 1 addition & 1 deletion paperclip
Submodule paperclip updated from e80f9a to 6806ae
22 changes: 17 additions & 5 deletions patches/paperclip/0002-Implement-Fabric-Loader.patch
Original file line number Diff line number Diff line change
Expand Up @@ -415,18 +415,26 @@ index 0000000000000000000000000000000000000000..794e208181d3f640b396d8c1aff0bfd0
+ }
+}
diff --git a/java17/src/main/java/io/papermc/paperclip/Paperclip.java b/java17/src/main/java/io/papermc/paperclip/Paperclip.java
index a10744d8d489b9ef3b6fcad850885c719a66b90f..6698942629eb64c08e24a8d942941ff30bc38ce4 100644
index a10744d8d489b9ef3b6fcad850885c719a66b90f..3dd3b783aa35800dc77b4413efd874526ca52adc 100644
--- a/java17/src/main/java/io/papermc/paperclip/Paperclip.java
+++ b/java17/src/main/java/io/papermc/paperclip/Paperclip.java
@@ -18,6 +18,7 @@ import java.util.HashMap;
@@ -7,6 +7,7 @@ import java.io.InputStreamReader;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
+import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.FileSystem;
@@ -18,6 +19,7 @@ import java.util.HashMap;
import java.util.Map;

public final class Paperclip {
+ public static Collection<URL> versions; // Toki

public static void main(final String[] args) {
if (Path.of("").toAbsolutePath().toString().contains("!")) {
@@ -25,21 +26,31 @@ public final class Paperclip {
@@ -25,21 +27,31 @@ public final class Paperclip {
System.exit(1);
}

Expand Down Expand Up @@ -464,12 +472,16 @@ index a10744d8d489b9ef3b6fcad850885c719a66b90f..6698942629eb64c08e24a8d942941ff3
} catch (final Throwable t) {
throw Util.sneakyThrow(t);
}
@@ -81,11 +92,16 @@ public final class Paperclip {
@@ -81,11 +93,20 @@ public final class Paperclip {
final Collection<URL> versionUrls = classpathUrls.get("versions").values();
final Collection<URL> libraryUrls = classpathUrls.get("libraries").values();

+ Paperclip.versions = versionUrls;
+ System.setProperty("fabric.gameJarPath", versionUrls.stream().findFirst().orElseThrow(() -> new IllegalStateException("Didn't find any versions!")).getPath()); // Toky - implement fabric loader
+ try {
+ System.setProperty("fabric.gameJarPath", Path.of(versionUrls.stream().findFirst().orElseThrow(() -> new IllegalStateException("Didn't find any versions!")).toURI()).toAbsolutePath().toString()); // Toky - implement fabric loader
+ } catch (Throwable e) {
+ throw new RuntimeException("Something went wrong while trying to set fabric's game jar path: ", e);
+ }
+
final URL[] emptyArray = new URL[0];
+ /*
Expand Down

0 comments on commit d52fd72

Please sign in to comment.