Class WorldSelectionList
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractContainerWidget
net.minecraft.client.gui.components.AbstractSelectionList<WorldSelectionList.Entry>
net.minecraft.client.gui.components.ObjectSelectionList<WorldSelectionList.Entry>
net.minecraft.client.gui.screens.worldselection.WorldSelectionList
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
,IAbstractWidgetExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
final class
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<LevelSummary> static final DateTimeFormatter
(package private) static final ResourceLocation
(package private) static final ResourceLocation
private String
private static final ResourceLocation
(package private) static final Component
(package private) static final Component
(package private) static final Component
(package private) static final ResourceLocation
(package private) static final ResourceLocation
private final WorldSelectionList.LoadingHeader
(package private) static final org.slf4j.Logger
(package private) static final ResourceLocation
(package private) static final ResourceLocation
private CompletableFuture
<List<LevelSummary>> private final SelectWorldScreen
(package private) static final Component
(package private) static final Component
(package private) static final ResourceLocation
(package private) static final ResourceLocation
(package private) static final Component
(package private) static final Component
(package private) static final Component
Fields inherited from class net.minecraft.client.gui.components.AbstractSelectionList
centerListVertically, headerHeight, itemHeight, minecraft, SCROLLBAR_WIDTH
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorsConstructorDescriptionWorldSelectionList
(SelectWorldScreen pScreen, Minecraft pMinecraft, int pWidth, int pHeight, int pY, int pItemHeight, String pFilter, WorldSelectionList pWorlds) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
private void
fillLevels
(String pFilter, List<LevelSummary> pLevels) private void
private boolean
filterAccepts
(String pFilter, LevelSummary pLevel) int
private void
handleLevelLoadFailure
(Component pExceptionMessage) private void
handleNewLevels
(List<LevelSummary> pLevels) boolean
keyPressed
(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.private CompletableFuture
<List<LevelSummary>> private void
private List
<LevelSummary> (package private) void
void
renderWidget
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) void
setSelected
(WorldSelectionList.Entry pSelected) void
updateFilter
(String pFilter) void
updateWidgetNarration
(NarrationElementOutput pNarrationElementOutput) Methods inherited from class net.minecraft.client.gui.components.ObjectSelectionList
nextFocusPath
Methods inherited from class net.minecraft.client.gui.components.AbstractSelectionList
addEntry, addEntryToTop, centerScrollOn, children, clampScrollAmount, clickedHeader, enableScissor, ensureVisible, getDefaultScrollbarPosition, getEntry, getEntryAtPosition, getFirstElement, getFocused, getHovered, getItemCount, getMaxPosition, getMaxScroll, getRowBottom, getRowLeft, getRowRight, getRowTop, getScrollAmount, getScrollbarPosition, getSelected, isMouseOver, isSelectedItem, isValidMouseClick, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, narrateListElementPosition, narrationPriority, nextEntry, nextEntry, nextEntry, remove, removeEntry, removeEntryFromTop, renderDecorations, renderHeader, renderItem, renderListBackground, renderListItems, renderListSeparators, renderSelection, replaceEntries, scrollbarVisible, setClampedScrollAmount, setFocused, setRenderHeader, setScrollAmount, updateScrollingState, updateSize, updateSizeAndPosition
Methods inherited from class net.minecraft.client.gui.components.AbstractContainerWidget
isDragging, isFocused, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isHovered, isHoveredOrFocused, isValidClickButton, onClick, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage
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.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, keyReleased
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, mouseMoved
Methods inherited from interface net.neoforged.neoforge.client.extensions.IAbstractWidgetExtension
onClick
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
DATE_FORMAT
-
ERROR_HIGHLIGHTED_SPRITE
-
ERROR_SPRITE
-
MARKED_JOIN_HIGHLIGHTED_SPRITE
-
MARKED_JOIN_SPRITE
-
WARNING_HIGHLIGHTED_SPRITE
-
WARNING_SPRITE
-
JOIN_HIGHLIGHTED_SPRITE
-
JOIN_SPRITE
-
FORGE_EXPERIMENTAL_WARNING_ICON
-
LOGGER
static final org.slf4j.Logger LOGGER -
FROM_NEWER_TOOLTIP_1
-
FROM_NEWER_TOOLTIP_2
-
SNAPSHOT_TOOLTIP_1
-
SNAPSHOT_TOOLTIP_2
-
WORLD_LOCKED_TOOLTIP
-
WORLD_REQUIRES_CONVERSION
-
INCOMPATIBLE_VERSION_TOOLTIP
-
WORLD_EXPERIMENTAL
-
screen
-
pendingLevels
-
currentlyDisplayedLevels
-
filter
-
loadingHeader
-
-
Constructor Details
-
WorldSelectionList
public WorldSelectionList(SelectWorldScreen pScreen, Minecraft pMinecraft, int pWidth, int pHeight, int pY, int pItemHeight, String pFilter, @Nullable WorldSelectionList pWorlds)
-
-
Method Details
-
clearEntries
protected void clearEntries()- Overrides:
clearEntries
in classAbstractSelectionList<WorldSelectionList.Entry>
-
pollLevelsIgnoreErrors
-
reloadWorldList
void reloadWorldList() -
keyPressed
public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.- Parameters:
pKeyCode
- the key code of the pressed key.pScanCode
- the scan code of the pressed key.pModifiers
- the keyboard modifiers.- Returns:
true
if the event is consumed,false
otherwise.
-
renderWidget
- Overrides:
renderWidget
in classAbstractSelectionList<WorldSelectionList.Entry>
-
handleNewLevels
-
updateFilter
-
loadLevels
-
fillLevels
-
filterAccepts
-
fillLoadingLevels
private void fillLoadingLevels() -
notifyListUpdated
private void notifyListUpdated() -
handleLevelLoadFailure
-
getRowWidth
public int getRowWidth()- Overrides:
getRowWidth
in classAbstractSelectionList<WorldSelectionList.Entry>
-
setSelected
- Overrides:
setSelected
in classAbstractSelectionList<WorldSelectionList.Entry>
-
getSelectedOpt
-
getScreen
-
updateWidgetNarration
- Overrides:
updateWidgetNarration
in classObjectSelectionList<WorldSelectionList.Entry>
-