Class ModListScreen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- net.minecraftforge.fml.client.gui.screen.ModListScreen
-
- All Implemented Interfaces:
IGuiEventListener,INestedGuiEventHandler,IRenderable,IScreen
public class ModListScreen extends Screen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classModListScreen.InfoPanelprivate static classModListScreen.SortType
-
Field Summary
Fields Modifier and Type Field Description private intbuttonMarginprivate ButtonconfigButtonprivate java.lang.StringlastFilterTextprivate intlistWidthprivate static org.apache.logging.log4j.LoggerLOGGERprivate ModListScreen.InfoPanelmodInfoprivate ModListWidgetmodListprivate java.util.List<ModInfo>modsprivate intnumButtonsprivate ButtonopenModsFolderButtonprivate static intPADDINGprivate ScreenparentScreenprivate TextFieldWidgetsearchprivate ModListWidget.ModEntryselectedprivate booleansortedprivate ModListScreen.SortTypesortTypeprivate java.util.List<ModInfo>unsortedMods-
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description ModListScreen(Screen parentScreen)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ExtendedList.AbstractListEntry<T>>
voidbuildModList(java.util.function.Consumer<T> modListViewConsumer, java.util.function.Function<ModInfo,T> newEntry)private voiddisplayModConfig()FontRenderergetFontRenderer()MinecraftgetMinecraftInstance()voidinit()voidonClose()private voidreloadMods()voidrender(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)voidresize(Minecraft mc, int width, int height)private voidresortMods(ModListScreen.SortType newSort)voidsetSelected(ModListWidget.ModEntry entry)private static java.lang.StringstripControlCodes(java.lang.String value)voidtick()private voidupdateCache()-
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onFilesDrop, removed, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.gui.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
PADDING
private static final int PADDING
- See Also:
- Constant Field Values
-
parentScreen
private Screen parentScreen
-
modList
private ModListWidget modList
-
modInfo
private ModListScreen.InfoPanel modInfo
-
selected
private ModListWidget.ModEntry selected
-
listWidth
private int listWidth
-
mods
private java.util.List<ModInfo> mods
-
unsortedMods
private final java.util.List<ModInfo> unsortedMods
-
configButton
private Button configButton
-
openModsFolderButton
private Button openModsFolderButton
-
buttonMargin
private int buttonMargin
-
numButtons
private int numButtons
-
lastFilterText
private java.lang.String lastFilterText
-
search
private TextFieldWidget search
-
sorted
private boolean sorted
-
sortType
private ModListScreen.SortType sortType
-
-
Constructor Detail
-
ModListScreen
public ModListScreen(Screen parentScreen)
- Parameters:
parentScreen-
-
-
Method Detail
-
stripControlCodes
private static java.lang.String stripControlCodes(java.lang.String value)
-
displayModConfig
private void displayModConfig()
-
buildModList
public <T extends ExtendedList.AbstractListEntry<T>> void buildModList(java.util.function.Consumer<T> modListViewConsumer, java.util.function.Function<ModInfo,T> newEntry)
-
reloadMods
private void reloadMods()
-
resortMods
private void resortMods(ModListScreen.SortType newSort)
-
render
public void render(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
- Specified by:
renderin interfaceIRenderable- Overrides:
renderin classScreen
-
getMinecraftInstance
public Minecraft getMinecraftInstance()
-
getFontRenderer
public FontRenderer getFontRenderer()
-
setSelected
public void setSelected(ModListWidget.ModEntry entry)
-
updateCache
private void updateCache()
-
-