port to 1.21.4, RECORDS LIST IS BROKEN

This commit is contained in:
MeexReay 2025-06-15 20:36:55 +03:00
parent f082788406
commit c65e906500
4 changed files with 13 additions and 13 deletions

View file

@ -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();

View file

@ -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);