Skip to content

Commit

Permalink
fixed for opening resourcepack path on Windows(IDK how to mixin optif…
Browse files Browse the repository at this point in the history
…ine so...)
  • Loading branch information
PumpkinXD committed Nov 18, 2022
1 parent 2e67b36 commit a3cff48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ compileJava {
sourceCompatibility = targetCompatibility = 8
}

version= "0.2.0"
version= "0.2.1"
group= "io.github.pumpkinxd.linuxlegacymcurlfix"

minecraft {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public class LinuxLegacyMCURLFix {

public static final String MOD_ID = "linuxlegacymcurlfix";
public static final String VERSION = "0.1.1145141919810";
public static final String VERSION = "0.2.1";

@Mod.EventHandler
public void init(FMLPreInitializationEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public void fixOpenResFolder(CallbackInfo ci){
{
logger.info(repopath);
Runtime.getRuntime().exec(new String[] {"xdg-open", repopath});//requires xdg-util or won't working
//Runtime.getRuntime().exec(new String[] {"/usr/bin/xdg-open", repopath});//not working under freebsd
ci.cancel();
}
catch (IOException ioexception1)
Expand All @@ -67,17 +66,9 @@ public void fixOpenResFolder(CallbackInfo ci){

} else {
if (SystemUtils.IS_OS_WINDOWS) {
String s1;
if(Loader.isModLoaded("essential")&&repopath.charAt(0)=='\\')
{
s1 = String.format("cmd.exe /C start \"Open file\" \"%s\"", new Object[] {repopath.substring(1)});
}
else {
s1 = String.format("cmd.exe /C start \"Open file\" \"%s\"", new Object[]{repopath});
}
try
{
Runtime.getRuntime().exec(s1);
Runtime.getRuntime().exec(new String[]{"cmd","/C","start","\"Open file\"",repopath});//I guess this time the problem is fixed, **** essential
ci.cancel();
}
catch (IOException ioexception)
Expand Down

1 comment on commit a3cff48

@PumpkinXD
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optifine... emmmm
image
image

Please sign in to comment.