Class WorldSelectionList
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollArea
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic enumstatic classstatic final classfinal classNested classes/interfaces inherited from class AbstractScrollArea
AbstractScrollArea.ScrollbarSettingsNested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable List<LevelSummary> static final DateTimeFormatterprivate final WorldSelectionList.EntryTypeprivate static final Identifierprivate static final Identifierprivate Stringprivate static final Identifierprivate static final Componentprivate static final Componentprivate booleanprivate static final Componentprivate static final Identifierprivate static final Identifierprivate final WorldSelectionList.LoadingHeaderprivate static final org.slf4j.Loggerprivate static final Identifierprivate static final Identifierprivate final @Nullable Consumer<WorldSelectionList.WorldListEntry> private final @Nullable Consumer<LevelSummary> private CompletableFuture<List<LevelSummary>> private final Screenprivate static final Componentprivate static final Componentprivate static final Identifierprivate static final Identifierprivate static final Componentprivate static final Componentprivate static final ComponentFields inherited from class AbstractSelectionList
centerListVertically, defaultEntryHeight, minecraftFields inherited from class AbstractScrollArea
SCROLLBAR_WIDTHFields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateWorldSelectionList(Screen screen, Minecraft minecraft, int width, int height, String filter, @Nullable WorldSelectionList oldList, @Nullable Consumer<LevelSummary> onEntrySelect, @Nullable Consumer<WorldSelectionList.WorldListEntry> onEntryInteract, WorldSelectionList.EntryType entryType) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidfillLevels(String filter, List<LevelSummary> levels) private booleanfilterAccepts(String filter, LevelSummary level) intprivate voidhandleLevelLoadFailure(Component message) private voidhandleNewLevels(@Nullable List<LevelSummary> levels) private CompletableFuture<List<LevelSummary>> private voidprivate @Nullable List<LevelSummary> voidvoidrenderWidget(GuiGraphics graphics, int mouseX, int mouseY, float a) voidvoidsetSelected(@Nullable WorldSelectionList.Entry selected) voidupdateFilter(String newFilter) voidMethods inherited from class ObjectSelectionList
nextFocusPathMethods inherited from class AbstractSelectionList
addEntry, addEntry, addEntryToTop, addEntryToTop, centerScrollOn, children, clearEntriesExcept, contentHeight, enableScissor, entriesCanBeSelected, getChildAt, getEntryAtPosition, getFocused, getHovered, getItemCount, getNextY, getRowBottom, getRowLeft, getRowRight, getRowTop, getSelected, narrateListElementPosition, narrationPriority, nextEntry, nextEntry, nextEntry, removeEntries, removeEntry, removeEntryFromTop, renderItem, renderListBackground, renderListItems, renderListSeparators, renderSelection, replaceEntries, scrollBarX, scrollToEntry, setFocused, setScrollAmount, sort, swap, updateSize, updateSizeAndPosition, updateSizeAndPositionMethods inherited from class AbstractContainerWidget
isDragging, isFocused, mouseClicked, mouseDragged, mouseReleased, setDragging, setFocusedMethods inherited from class AbstractScrollArea
defaultSettings, isOverScrollbar, maxScrollAmount, mouseScrolled, onRelease, refreshScrollAmount, renderScrollbar, scrollable, scrollAmount, scrollbarWidth, scrollBarY, scrollerHeight, scrollRate, updateScrollingMethods inherited from class AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, onClick, onDrag, playButtonClickSound, playDownSound, render, renderScrollingStringOverContents, setAlpha, setFGColor, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContainerEventHandler
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyPressed, keyReleased, mouseScrolledMethods inherited from interface GuiEventListener
getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratablesMethods inherited from interface 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
private 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
-
loadingHeader
-
entryType
-
filter
-
hasPolled
private boolean hasPolled -
onEntrySelect
-
onEntryInteract
-
-
Constructor Details
-
WorldSelectionList
private WorldSelectionList(Screen screen, Minecraft minecraft, int width, int height, String filter, @Nullable WorldSelectionList oldList, @Nullable Consumer<LevelSummary> onEntrySelect, @Nullable Consumer<WorldSelectionList.WorldListEntry> onEntryInteract, WorldSelectionList.EntryType entryType)
-
-
Method Details
-
clearEntries
public void clearEntries()- Overrides:
clearEntriesin classAbstractSelectionList<WorldSelectionList.Entry>
-
pollLevelsIgnoreErrors
-
reloadWorldList
public void reloadWorldList() -
renderWidget
- Overrides:
renderWidgetin classAbstractSelectionList<WorldSelectionList.Entry>
-
handleNewLevels
-
updateFilter
-
loadLevels
-
fillLevels
-
filterAccepts
-
notifyListUpdated
private void notifyListUpdated() -
handleLevelLoadFailure
-
getRowWidth
public int getRowWidth()- Overrides:
getRowWidthin classAbstractSelectionList<WorldSelectionList.Entry>
-
setSelected
- Overrides:
setSelectedin classAbstractSelectionList<WorldSelectionList.Entry>
-
getSelectedOpt
-
returnToScreen
public void returnToScreen() -
getScreen
-
updateWidgetNarration
- Overrides:
updateWidgetNarrationin classObjectSelectionList<WorldSelectionList.Entry>
-