Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Farmer-Markus committed Jul 19, 2024
1 parent f7f1604 commit 486a89f
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 63 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ build
# other
eclipse
run
logs

# Files from Forge MDK
forge*changelog.txt
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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. <br />

Java 17 <br />
Minecraft 1.20 - 1.20.4 <br />
Fabric <br />

# 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)
Expand Down
18 changes: 4 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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();
}
}
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand All @@ -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"
}
}
6 changes: 3 additions & 3 deletions src/main/resources/mc122477fix.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 486a89f

Please sign in to comment.