Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 13ded78

Browse files
committed
try to fix CI
1 parent cbd3c98 commit 13ded78

File tree

6 files changed

+39
-13
lines changed

6 files changed

+39
-13
lines changed

1.16_combat-6/src/main/java/io/github/axolotlclient/mixin/MinecraftClientMainMixin.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,21 @@
2222

2323
package io.github.axolotlclient.mixin;
2424

25+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
26+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
27+
import io.github.axolotlclient.util.OSUtil;
2528
import net.minecraft.client.main.Main;
2629
import org.spongepowered.asm.mixin.Mixin;
2730
import org.spongepowered.asm.mixin.injection.At;
28-
import org.spongepowered.asm.mixin.injection.Redirect;
2931

3032
@Mixin(Main.class)
3133
public abstract class MinecraftClientMainMixin {
3234

33-
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/lang/System;setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"))
34-
private static String axolotlclient$noHeadless(String key, String value) {
35+
@WrapOperation(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/lang/System;setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"))
36+
private static String axolotlclient$noHeadless(String key, String value, Operation<String> original) {
37+
if (OSUtil.getOS() != OSUtil.OperatingSystem.WINDOWS) {
38+
return original.call(key, value);
39+
}
3540
return "";
3641
}
3742
}

1.20/src/main/java/io/github/axolotlclient/mixin/MinecraftClientMainMixin.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,21 @@
2222

2323
package io.github.axolotlclient.mixin;
2424

25+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
26+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
27+
import io.github.axolotlclient.util.OSUtil;
2528
import net.minecraft.client.main.Main;
2629
import org.spongepowered.asm.mixin.Mixin;
2730
import org.spongepowered.asm.mixin.injection.At;
28-
import org.spongepowered.asm.mixin.injection.Redirect;
2931

3032
@Mixin(Main.class)
3133
public abstract class MinecraftClientMainMixin {
3234

33-
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/lang/System;setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"))
34-
private static String axolotlclient$noHeadless(String key, String value) {
35+
@WrapOperation(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/lang/System;setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"))
36+
private static String axolotlclient$noHeadless(String key, String value, Operation<String> original) {
37+
if (OSUtil.getOS() != OSUtil.OperatingSystem.WINDOWS) {
38+
return original.call(key, value);
39+
}
3540
return "";
3641
}
3742
}

1.21/src/main/java/io/github/axolotlclient/mixin/MinecraftClientMainMixin.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,21 @@
2222

2323
package io.github.axolotlclient.mixin;
2424

25+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
26+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
27+
import io.github.axolotlclient.util.OSUtil;
2528
import net.minecraft.client.main.Main;
2629
import org.spongepowered.asm.mixin.Mixin;
2730
import org.spongepowered.asm.mixin.injection.At;
28-
import org.spongepowered.asm.mixin.injection.Redirect;
2931

3032
@Mixin(Main.class)
3133
public abstract class MinecraftClientMainMixin {
3234

33-
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/lang/System;setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"))
34-
private static String axolotlclient$noHeadless(String key, String value) {
35+
@WrapOperation(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/lang/System;setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"))
36+
private static String axolotlclient$noHeadless(String key, String value, Operation<String> original) {
37+
if (OSUtil.getOS() != OSUtil.OperatingSystem.WINDOWS) {
38+
return original.call(key, value);
39+
}
3540
return "";
3641
}
3742
}

1.8.9/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ loom {
2121
}
2222
}
2323

24+
repositories {
25+
exclusiveContent { forRepository { mavenCentral() }
26+
filter { includeGroup("org.lwjgl") }
27+
}
28+
}
29+
2430
dependencies {
2531
minecraft("com.mojang:minecraft:${project.property("minecraft_18")}")
2632
mappings("net.ornithemc:feather:${project.property("mappings_18")}")

1.8.9/src/main/java/io/github/axolotlclient/mixin/MinecraftClientMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected MinecraftClientMixin(TextureManager textureManager) {
173173
}
174174
}
175175

176-
@Inject(method = "updateWindow", at = @At("TAIL"))
176+
@Inject(method = "updateWindow", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;onResolutionChanged(II)V"))
177177
public void axolotlclient$onResize(CallbackInfo ci) {
178178
Util.window = null;
179179
HudManager.getInstance().refreshAllBounds();

1.latest/src/main/java/io/github/axolotlclient/mixin/MinecraftClientMainMixin.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,21 @@
2222

2323
package io.github.axolotlclient.mixin;
2424

25+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
26+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
27+
import io.github.axolotlclient.util.OSUtil;
2528
import net.minecraft.client.main.Main;
2629
import org.spongepowered.asm.mixin.Mixin;
2730
import org.spongepowered.asm.mixin.injection.At;
28-
import org.spongepowered.asm.mixin.injection.Redirect;
2931

3032
@Mixin(Main.class)
3133
public abstract class MinecraftClientMainMixin {
3234

33-
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/lang/System;setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"))
34-
private static String axolotlclient$noHeadless(String key, String value) {
35+
@WrapOperation(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/lang/System;setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"))
36+
private static String axolotlclient$noHeadless(String key, String value, Operation<String> original) {
37+
if (OSUtil.getOS() != OSUtil.OperatingSystem.WINDOWS) {
38+
return original.call(key, value);
39+
}
3540
return "";
3641
}
3742
}

0 commit comments

Comments
 (0)