From c65e9065006e9a04da8b176c05a6e79ace667b90 Mon Sep 17 00:00:00 2001 From: MeexReay Date: Sun, 15 Jun 2025 20:36:55 +0300 Subject: [PATCH] port to 1.21.4, RECORDS LIST IS BROKEN --- gradle.properties | 10 +++++----- .../ru/themixray/repeating_mod/mixin/InputMixin.java | 2 +- .../repeating_mod/widget/RecordListWidget.java | 12 ++++++------ src/main/resources/fabric.mod.json | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1c01598..63462f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,17 +4,17 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.21.2 -yarn_mappings=1.21.2+build.1 +minecraft_version=1.21.4 +yarn_mappings=1.21.4+build.8 loader_version=0.16.14 loom_version=1.10-SNAPSHOT # Fabric API -fabric_version=0.106.1+1.21.2 +fabric_version=0.119.3+1.21.4 # Mod Properties -mod_version = 1.1.2+1.21.2 +mod_version = 1.1.2+1.21.4 maven_group = ru.themixray archives_base_name = repeating-mod -# Compatible with: 1.21.2, ? \ No newline at end of file +# Compatible with: 1.21.4, ? \ No newline at end of file diff --git a/src/main/java/ru/themixray/repeating_mod/mixin/InputMixin.java b/src/main/java/ru/themixray/repeating_mod/mixin/InputMixin.java index 33acbf1..261c59c 100644 --- a/src/main/java/ru/themixray/repeating_mod/mixin/InputMixin.java +++ b/src/main/java/ru/themixray/repeating_mod/mixin/InputMixin.java @@ -10,7 +10,7 @@ import ru.themixray.repeating_mod.Main; @Mixin(KeyboardInput.class) public abstract class InputMixin { @Inject(at = @At(value = "TAIL"), method = "tick") - private void onTickTail(boolean slowDown, float f, CallbackInfo ci) { + private void onTickTail(CallbackInfo ci) { if (Main.me.is_replaying) { if (Main.input_replay != null) { Main.input_replay.inputCallback(); diff --git a/src/main/java/ru/themixray/repeating_mod/widget/RecordListWidget.java b/src/main/java/ru/themixray/repeating_mod/widget/RecordListWidget.java index 5b7a7e3..6ab167d 100644 --- a/src/main/java/ru/themixray/repeating_mod/widget/RecordListWidget.java +++ b/src/main/java/ru/themixray/repeating_mod/widget/RecordListWidget.java @@ -26,13 +26,18 @@ public class RecordListWidget extends ScrollableWidget { return res; } + @Override + protected int getContentsHeightWithPadding() { + return !widgets.isEmpty() ? widgets.size() * 55 + (widgets.size() - 1) * 2 : 0; + } + @Override protected double getDeltaYPerScroll() { return 10; } @Override - protected void renderContents(DrawContext ctx, int mouseX, int mouseY, float delta) { + protected void renderWidget(DrawContext ctx, int mouseX, int mouseY, float delta) { int y = 0; for (RecordWidget wid: widgets) { wid.setY(y); @@ -63,11 +68,6 @@ public class RecordListWidget extends ScrollableWidget { return focused; } - @Override - protected int getContentsHeight() { - return !widgets.isEmpty() ? widgets.size() * 55 + (widgets.size() - 1) * 2 : 0; - } - public void init(RepeatingScreen screen) { for (RecordWidget widget : widgets) { widget.init(screen); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 88e2fff..4a40393 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -29,7 +29,7 @@ "depends": { "fabricloader": ">=0.14.14", "fabric-api": "*", - "minecraft": ">=1.21.2", + "minecraft": ">=1.21.4", "java": ">=17" }, "suggests": {