feat: 1.21.1 backport

This commit is contained in:
trafficlunar 2025-03-01 22:17:07 +00:00
parent fd17833a16
commit ae2245c4bd
8 changed files with 20 additions and 20 deletions

View file

@ -70,8 +70,8 @@ public class OptionsToggleList extends ContainerObjectSelectionList<OptionsToggl
}
}
protected int scrollBarX() {
return super.scrollBarX() + 15;
protected int getScrollbarPosition() {
return super.getScrollbarPosition() + 15;
}
public int getRowWidth() {
@ -113,7 +113,7 @@ public class OptionsToggleList extends ContainerObjectSelectionList<OptionsToggl
public void render(GuiGraphics guiGraphics, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
Font fontRenderer = OptionsToggleList.this.minecraft.font;
int posX = OptionsToggleList.this.scrollBarX() - this.toggleButton.getWidth() - 10;
int posX = OptionsToggleList.this.getScrollbarPosition() - this.toggleButton.getWidth() - 10;
int posY = y - 2;
int textY = y + entryHeight / 2;

View file

@ -58,8 +58,8 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Prof
this.children().forEach(ProfileEntry::checkLoaded);
}
protected int scrollBarX() {
return super.scrollBarX() + 15;
protected int getScrollbarPosition() {
return super.getScrollbarPosition() + 15;
}
public int getRowWidth() {
@ -105,7 +105,7 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Prof
public void render(GuiGraphics guiGraphics, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
Font fontRenderer = ProfilesList.this.minecraft.font;
int posX = ProfilesList.this.scrollBarX() - this.loadButton.getWidth() - 10;
int posX = ProfilesList.this.getScrollbarPosition() - this.loadButton.getWidth() - 10;
int posY = y - 2;
int textY = y + entryHeight / 2;