Skip to content

Commit

Permalink
Fix 1.18.x on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Barteks2x committed Jan 7, 2022
1 parent dc30b98 commit 70abe02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'

version = "2.6.4"
version = "2.6.5"
group = "ofdev" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "aa_do_not_rename_OptiFineDevTweaker"

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/ofdev/modlauncher/OFDevRetransformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ private static Collection<? extends Target> findOptiFineClasses(IEnvironment env
@SuppressWarnings("unchecked") Optional<URI> location = (Optional<URI>) locationMethod.invoke(reference);
String path = location.orElseThrow(() -> new IllegalStateException("No module location!")).getPath();
optifineFile = path.substring(0, path.lastIndexOf('#'));
if (optifineFile.startsWith("/")) {
optifineFile = optifineFile.substring(1);
}
optifineFile = Paths.get(optifineFile).getFileName().toString();
} catch (ReflectiveOperationException ex) {
throw new IllegalStateException(ex);
Expand Down

0 comments on commit 70abe02

Please sign in to comment.