Class SelectionScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
fr.pacdu.pacpackquests.client.screen.SelectionScreen
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler,net.minecraft.client.gui.components.events.GuiEventListener,net.minecraft.client.gui.components.Renderable,net.minecraft.client.gui.components.TabOrderedElement
public class SelectionScreen
extends net.minecraft.client.gui.screens.Screen
Screen for selecting elements across various Minecraft registries (items, blocks, entities, biomes, etc.).
For items, it replicates JEI's creative tab ordering, multi-line tooltips (mod name, components, IDs),
and advanced search (@mod, #tags, names, and tooltip contents).
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
Fields inherited from class net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionSelectionScreen(net.minecraft.client.gui.screens.Screen parent, RegistryType contextType, Consumer<String> onSelected, String previouslySelectedEntry) SelectionScreen(net.minecraft.client.gui.screens.Screen parent, RegistryType contextType, Consumer<String> onSelected, String previouslySelectedEntry, boolean withTags) SelectionScreen(net.minecraft.client.gui.screens.Screen parent, RegistryType contextType, Consumer<String> onSelected, String previouslySelectedEntry, boolean withTags, boolean isReward) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinit()booleankeyPressed(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int button) booleanmouseDragged(double mouseX, double mouseY, int button, double offsetX, double offsetY) booleanmouseReleased(double mouseX, double mouseY, int button) booleanmouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) voidrefreshEntries(List<String> newEntries) voidrender(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY, float delta) Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenErrorMethods 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, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
SelectionScreen
public SelectionScreen(net.minecraft.client.gui.screens.Screen parent, RegistryType contextType, Consumer<String> onSelected, String previouslySelectedEntry) -
SelectionScreen
public SelectionScreen(net.minecraft.client.gui.screens.Screen parent, RegistryType contextType, Consumer<String> onSelected, String previouslySelectedEntry, boolean withTags) -
SelectionScreen
public SelectionScreen(net.minecraft.client.gui.screens.Screen parent, RegistryType contextType, Consumer<String> onSelected, String previouslySelectedEntry, boolean withTags, boolean isReward)
-
-
Method Details
-
init
protected void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
getRegistryType
-
refreshEntries
-
render
public void render(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY, float delta) - Specified by:
renderin interfacenet.minecraft.client.gui.components.Renderable- Overrides:
renderin classnet.minecraft.client.gui.screens.Screen
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) -
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) -
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int button, double offsetX, double offsetY) -
mouseReleased
public boolean mouseReleased(double mouseX, double mouseY, int button) -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classnet.minecraft.client.gui.screens.Screen
-