Tiny code clean up
It was annoying me
This commit is contained in:
parent
3a8f3695f6
commit
919fdc3486
1 changed files with 3 additions and 10 deletions
|
|
@ -20,7 +20,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entry> {
|
public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.ProfileEntry> {
|
||||||
private final ProfilesScreen profilesScreen;
|
private final ProfilesScreen profilesScreen;
|
||||||
|
|
||||||
public ProfilesList(ProfilesScreen profilesScreen, Minecraft minecraft) {
|
public ProfilesList(ProfilesScreen profilesScreen, Minecraft minecraft) {
|
||||||
|
|
@ -53,7 +53,7 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entr
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkEntriesLoaded() {
|
public void checkEntriesLoaded() {
|
||||||
this.children().forEach(Entry::checkLoaded);
|
this.children().forEach(ProfileEntry::checkLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getScrollbarPosition() {
|
protected int getScrollbarPosition() {
|
||||||
|
|
@ -64,7 +64,7 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entr
|
||||||
return 340;
|
return 340;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ProfileEntry extends Entry {
|
public class ProfileEntry extends ContainerObjectSelectionList.Entry<ProfilesList.ProfileEntry> {
|
||||||
private final Component profileName;
|
private final Component profileName;
|
||||||
private final Button editButton;
|
private final Button editButton;
|
||||||
private final Button loadButton;
|
private final Button loadButton;
|
||||||
|
|
@ -127,11 +127,4 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entr
|
||||||
this.loadButton.active = !Profiles.isProfileLoaded(profileName.getString());
|
this.loadButton.active = !Profiles.isProfileLoaded(profileName.getString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class Entry extends ContainerObjectSelectionList.Entry<ProfilesList.Entry> {
|
|
||||||
public Entry() {
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract void checkLoaded();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue