Class ModListScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.neoforged.neoforge.client.gui.ModListScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classprivate static enumNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Buttonprivate Buttonprivate Stringprivate intprivate static final org.apache.logging.log4j.Loggerprivate ModListScreen.InfoPanelprivate ModListWidgetprivate List<ModContainer> private intprivate Buttonprivate static final intprivate Screenprivate EditBoxprivate ModListWidget.ModEntryprivate booleanprivate ModListScreen.SortTypeprivate final List<ModContainer> Fields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends ObjectSelectionList.Entry<T>>
voidbuildModList(Consumer<T> modListViewConsumer, Function<ModContainer, T> newEntry) private voidprotected voidhandleClickEvent(Minecraft minecraft, ClickEvent clickEvent) voidinit()voidonClose()private voidvoidrender(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) Renders the graphical user interface (GUI) element.voidprivate voidresortMods(ModListScreen.SortType newSort) voidprivate static StringstripControlCodes(String value) voidtick()private voidMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, repositionElements, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
PADDING
private static final int PADDING- See Also:
-
parentScreen
-
modList
-
modInfo
-
selected
-
listWidth
private int listWidth -
mods
-
unsortedMods
-
configButton
-
openModsFolderButton
-
doneButton
-
buttonMargin
private int buttonMargin -
numButtons
private int numButtons -
lastFilterText
-
search
-
sorted
private boolean sorted -
sortType
-
-
Constructor Details
-
ModListScreen
-
-
Method Details
-
stripControlCodes
-
init
public void init() -
displayModConfig
private void displayModConfig() -
tick
public void tick() -
buildModList
public <T extends ObjectSelectionList.Entry<T>> void buildModList(Consumer<T> modListViewConsumer, Function<ModContainer, T> newEntry) -
reloadMods
private void reloadMods() -
resortMods
-
render
Description copied from interface:RenderableRenders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen- Parameters:
guiGraphics- the GuiGraphics object used for rendering.mouseX- the x-coordinate of the mouse cursor.mouseY- the y-coordinate of the mouse cursor.partialTick- the partial tick time.
-
getMinecraftInstance
-
getFontRenderer
-
setSelected
-
updateCache
private void updateCache() -
resize
-
onClose
public void onClose() -
handleClickEvent
- Overrides:
handleClickEventin classScreen
-