Fix protocol selection in 1.20.4 not working

This commit is contained in:
FlorianMichael 2024-04-28 22:24:16 +02:00
parent 9ba5f28ebd
commit 2548bfa8dd
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -41,8 +41,6 @@ public class GuiProtocolSelector extends Screen {
public final boolean simple;
public final FinishedCallback finishedCallback;
private SlotList list;
private String status;
private long time;
@ -80,7 +78,7 @@ public class GuiProtocolSelector extends Screen {
addRenderableWidget(Button.builder(Component.literal("Reload configs"), b -> Via.getManager().getConfigurationProvider().reloadConfigs()).bounds(width - 105, height - 25, 100, 20).build());
}
list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, 30, font.lineHeight + 2);
addRenderableWidget(new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, 30, font.lineHeight + 2));
}
public void setStatus(final String status) {
@ -102,7 +100,6 @@ public class GuiProtocolSelector extends Screen {
this.status = null;
}
this.list.render(graphics, p_230430_2_, p_230430_3_, p_230430_4_);
super.render(graphics, p_230430_2_, p_230430_3_, p_230430_4_);
final var pose = graphics.pose();