-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the vanilla method to open chat links not working for every OS
- Loading branch information
1 parent
d8488b1
commit 7b12b54
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/mitchej123/hodgepodge/mixins/early/minecraft/MixinGuiChat_OpenLinks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.mitchej123.hodgepodge.mixins.early.minecraft; | ||
|
||
import java.net.URI; | ||
|
||
import net.minecraft.client.gui.GuiChat; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Overwrite; | ||
|
||
import com.gtnewhorizon.gtnhlib.util.FilesUtil; | ||
|
||
@Mixin(GuiChat.class) | ||
public class MixinGuiChat_OpenLinks { | ||
|
||
/** | ||
* @author Alexdoru | ||
* @reason The Vanilla method doesn't work on some OS | ||
*/ | ||
@Overwrite | ||
private void func_146407_a(URI uri) { | ||
FilesUtil.openUri(uri); | ||
} | ||
|
||
} |