Skip to content

Commit

Permalink
Update MixinGuiChat_OpenLinks.java (#441)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexdoru <57050655+Alexdoru@users.noreply.github.com>
  • Loading branch information
mitchej123 and Alexdoru authored Nov 20, 2024
1 parent dbccac6 commit b2fa0bd
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
import net.minecraft.client.gui.GuiChat;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

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) {
// @reason The Vanilla method doesn't work on some OS
@Inject(method = "func_146407_a", at = @At("HEAD"), cancellable = true)
private void hodgepodge$fixFileOpening(URI uri, CallbackInfo ci) {
FilesUtil.openUri(uri);
ci.cancel();
}

}

0 comments on commit b2fa0bd

Please sign in to comment.