diff --git a/.gitignore b/.gitignore
index 12f8644..33bf41b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@ build
# other
eclipse
run
+logs
# Files from Forge MDK
forge*changelog.txt
diff --git a/README.md b/README.md
index 96bd8e4..8173c6f 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,3 @@
-# This is a fork and not the original
-I cloned this mod from [here](https://github.com/RecursiveG/Mc122477Fix) to release the mod for fabric and newer versions.
-
-Java 17
-Minecraft 1.20 - 1.20.4
-Fabric
-
# MC-122477 Fix
![[CurseForge](https://www.curseforge.com/minecraft/mc-mods/mc122477fix)](https://cf.way2muchnoise.eu/versions/432448.svg)
![GitHub](https://img.shields.io/github/license/RecursiveG/Mc122477Fix)
diff --git a/build.gradle b/build.gradle
index 461230d..8dddc34 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,10 +1,10 @@
plugins {
- id 'fabric-loom' version '1.6.11'
+ id 'fabric-loom' version '0.7-SNAPSHOT'
id 'maven-publish'
}
-sourceCompatibility = JavaVersion.VERSION_17
-targetCompatibility = JavaVersion.VERSION_17
+sourceCompatibility = JavaVersion.VERSION_1_8
+targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = project.archives_base_name
version = project.mod_version
@@ -23,15 +23,6 @@ dependencies {
// You may need to force-disable transitiveness on them.
}
-processResources {
- inputs.property "version", project.version
-
- filesMatching("fabric.mod.json") {
- expand "version": project.version
- }
-}
-
-/*
processResources {
inputs.property "version", project.version
@@ -44,7 +35,6 @@ processResources {
exclude "fabric.mod.json"
}
}
-*/
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
@@ -57,7 +47,7 @@ tasks.withType(JavaCompile) {
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
- archiveClassifier = "sources"
+ classifier = "sources"
from sourceSets.main.allSource
}
diff --git a/gradle.properties b/gradle.properties
index 2c8464a..e255e97 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
-minecraft_version=1.20
-yarn_mappings=1.20+build.1
+minecraft_version=1.16
+yarn_mappings=1.16+build.4
loader_version=0.15.11
# Mod Properties
-mod_version=1.1.0+mc1.20.0-4
+mod_version=1.1.0+mc1.16
maven_group=me.sizableshrimp
archives_base_name=Mc122477Fix-fabric
# Dependencies
# check this on https://modmuss50.me/fabric.html
-fabric_version=0.83.0+1.20
+fabric_version=0.42.0+1.16
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 4518132..1d5b29f 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
diff --git a/src/main/java/me/sizableshrimp/mc122477fix/Mc122477Fix.java b/src/main/java/me/sizableshrimp/mc122477fix/Mc122477Fix.java
index 50d1739..c1727e8 100644
--- a/src/main/java/me/sizableshrimp/mc122477fix/Mc122477Fix.java
+++ b/src/main/java/me/sizableshrimp/mc122477fix/Mc122477Fix.java
@@ -24,7 +24,7 @@ public void onInitializeClient() {
return ActionResult.PASS;
// If the chat or command key was pressed, store what poll count it happened on.
- if (client.options.chatKey.matchesKey(key, scancode) || client.options.commandKey.matchesKey(key, scancode)) {
+ if (client.options.keyChat.matchesKey(key, scancode) || client.options.keyCommand.matchesKey(key, scancode)) {
this.prevKeyPoll = this.pollCount;
} else {
// Otherwise, set to -1
diff --git a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinKeyboard.java b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinKeyboard.java
index 153159a..a268e73 100644
--- a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinKeyboard.java
+++ b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinKeyboard.java
@@ -19,7 +19,7 @@ private void injectOnKey(long window, int key, int scancode, int i, int j, Callb
ci.cancel();
}
- @Inject(method = "onChar", at = @At(value = "FIELD", target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;", ordinal = 0), cancellable = true)
+ @Inject(method = "onChar", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Keyboard;client:Lnet/minecraft/client/MinecraftClient;", ordinal = 0), cancellable = true)
private void injectOnChar(long window, int i, int j, CallbackInfo ci) {
ActionResult result = KeyboardCharTypedCallback.EVENT.invoker().onCharTyped(window, i, j);
diff --git a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinMinecraftClient.java b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinMinecraftClient.java
deleted file mode 100644
index 0b42a34..0000000
--- a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinMinecraftClient.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package me.sizableshrimp.mc122477fix.mixin;
-
-import me.sizableshrimp.mc122477fix.GLFWPollCallback;
-import net.minecraft.client.MinecraftClient;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-
-
-@Mixin(MinecraftClient.class)
-public class MixinMinecraftClient {
- @Inject(method = "tick", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GLX;pollEvents()V", shift = At.Shift.AFTER, ordinal = 0))
- private void injectGlfwPoll(CallbackInfo ci) {
- GLFWPollCallback.EVENT.invoker().onPoll();
- }
-}
-
-
-
-/*
-@Mixin(MinecraftClient.class)
-public class MixinMinecraftClient {
- @Inject(method = "tick", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GLX;pollEvent()V", shift = At.Shift.AFTER, ordinal = 0))
- private void injectGlfwPoll(CallbackInfo ci) {
- GLFWPollCallback.EVENT.invoker().onPoll();
- }
-}
-*/
diff --git a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinRenderSystem.java b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinRenderSystem.java
new file mode 100644
index 0000000..9765cee
--- /dev/null
+++ b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinRenderSystem.java
@@ -0,0 +1,16 @@
+package me.sizableshrimp.mc122477fix.mixin;
+
+import com.mojang.blaze3d.systems.RenderSystem;
+import me.sizableshrimp.mc122477fix.GLFWPollCallback;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(RenderSystem.class)
+public class MixinRenderSystem {
+ @Inject(method = "flipFrame", at = @At(value = "INVOKE", target = "Lorg/lwjgl/glfw/GLFW;glfwPollEvents()V", shift = At.Shift.AFTER))
+ private static void injectGlfwPoll(CallbackInfo ci) {
+ GLFWPollCallback.EVENT.invoker().onPoll();
+ }
+}
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 62744ce..375bcbe 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -5,7 +5,7 @@
"name": "Mc122477Fix",
"description": "A simple mod that fixes MC-122477, the random extra chat character on Unix-based systems",
"authors": [
- "SizableShrimp(creator), Farmer_Markus(compatibility with other MC versions)"
+ "SizableShrimp"
],
"contact": {
"homepage": "https://modrinth.com/project/mc122477fix-re-updated/",
@@ -24,8 +24,8 @@
"mc122477fix.mixins.json"
],
"depends": {
- "fabricloader": ">=0.14.18",
+ "fabricloader": ">=0.15.11",
"fabric": "*",
- "minecraft": ">=1.20 <=1.20.4"
+ "minecraft": ">=1.16 <=1.16.5"
}
}
diff --git a/src/main/resources/mc122477fix.mixins.json b/src/main/resources/mc122477fix.mixins.json
index ea1766a..b9f64e3 100644
--- a/src/main/resources/mc122477fix.mixins.json
+++ b/src/main/resources/mc122477fix.mixins.json
@@ -2,10 +2,10 @@
"required": true,
"minVersion": "0.8",
"package": "me.sizableshrimp.mc122477fix.mixin",
- "compatibilityLevel": "JAVA_17",
+ "compatibilityLevel": "JAVA_8",
"client": [
- "MixinKeyboard"
- //"MixinRenderSystem"
+ "MixinKeyboard",
+ "MixinRenderSystem"
],
"injectors": {
"defaultRequire": 1