Skip to content

Commit 193f301

Browse files
committed
fix MC-122477 crash on linux
1 parent 00f8f32 commit 193f301

File tree

8 files changed

+22
-6
lines changed

8 files changed

+22
-6
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plugins {
1919
}
2020

2121
group = "dev.isxander"
22-
version = "1.19.4+2.0"
22+
version = "1.19.4+2.1"
2323

2424
loom {
2525
splitEnvironmentSourceSets()

changelogs/1.19.4/1.19.4+2.1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix crash relating to MC-122477 on Linux

src/client/java/dev/isxander/debugify/client/mixins/basic/mc122477/RenderSystemMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@BugFix(id = "MC-122477", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, os = OS.LINUX)
1414
@Mixin(value = RenderSystem.class, priority = 1100, remap = false) // higher priority to improve compatibility with VulkanMod
1515
public class RenderSystemMixin {
16-
@Inject(method = "flipFrame", at = @At(value = "INVOKE", target = "Lorg/lwjgl/glfw/GLFW;glfwPollEvents()V"))
16+
@Inject(method = "flipFrame", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;pollEvents()V"))
1717
private static void onPollEvents(long window, CallbackInfo ci) {
1818
KeyboardPollCounter.poll();
1919
}

src/client/resources/debugify.client.mixins.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"defaultRequire": 1,
77
"maxShiftBy": 2
88
},
9-
"plugin": "dev.isxander.debugify.utils.MixinPlugin",
9+
"plugin": "dev.isxander.debugify.mixinplugin.MixinPlugin",
1010
"client": [
1111
"basic.mc108948.BoatMixin",
1212
"basic.mc111516.PlayerRendererMixin",

src/main/java/dev/isxander/debugify/fixes/BugFixData.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dev.isxander.debugify.fixes;
22

33
import dev.isxander.debugify.api.DebugifyApi;
4+
import dev.isxander.debugify.mixinplugin.DebugifyDebugFlags;
45
import net.fabricmc.loader.api.FabricLoader;
56
import org.jetbrains.annotations.NotNull;
67

@@ -23,7 +24,10 @@ public Set<String> getActiveConflicts() {
2324
}
2425

2526
public boolean satisfiesOSRequirement() {
26-
return requiredOs() == OS.UNKNOWN || requiredOs() == OS.getOperatingSystem();
27+
return requiredOs() == OS.UNKNOWN || requiredOs() == OS.getOperatingSystem()
28+
|| (requiredOs() == OS.LINUX && DebugifyDebugFlags.FORCE_LINUX_FIXES)
29+
|| (requiredOs() == OS.WINDOWS && DebugifyDebugFlags.FORCE_WINDOWS_FIXES)
30+
|| (requiredOs() == OS.MAC && DebugifyDebugFlags.FORCE_MACOS_FIXES);
2731
}
2832

2933
@Override
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package dev.isxander.debugify.mixinplugin;
2+
3+
public class DebugifyDebugFlags {
4+
public static final boolean FORCE_LINUX_FIXES = boolProp("debugify.forceLinuxFixes");
5+
public static final boolean FORCE_WINDOWS_FIXES = boolProp("debugify.forceWindowsFixes");
6+
public static final boolean FORCE_MACOS_FIXES = boolProp("debugify.forceMacOSFixes");
7+
8+
private static boolean boolProp(String property) {
9+
return Boolean.parseBoolean(System.getProperty(property));
10+
}
11+
}

src/main/java/dev/isxander/debugify/utils/MixinPlugin.java renamed to src/main/java/dev/isxander/debugify/mixinplugin/MixinPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dev.isxander.debugify.utils;
1+
package dev.isxander.debugify.mixinplugin;
22

33
import dev.isxander.debugify.Debugify;
44
import dev.isxander.debugify.api.DebugifyApi;

src/main/resources/debugify.mixins.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"defaultRequire": 1,
77
"maxShiftBy": 2
88
},
9-
"plugin": "dev.isxander.debugify.utils.MixinPlugin",
9+
"plugin": "dev.isxander.debugify.mixinplugin.MixinPlugin",
1010
"mixins": [
1111
"basic.mc100991.FishingHookMixin",
1212
"basic.mc100991.ProjectileMixin",

0 commit comments

Comments
 (0)