Package net.minecraft.client.gui
Interface ParentElement
- All Known Implementing Classes:
AbstractCommandBlockScreen,AbstractFurnaceScreen,AbstractParentElement,AbstractSignEditScreen,AbuseReportReasonScreen,AbuseReportReasonScreen.ReasonListWidget,AbuseReportTypeScreen,AccessibilityOnboardingScreen,AccessibilityOptionsScreen,AddServerScreen,AdvancementsScreen,AlwaysSelectedEntryListWidget,AnvilScreen,BackupPromptScreen,BeaconScreen,BlastFurnaceScreen,BookEditScreen,BookScreen,BookSigningScreen,BrewingStandScreen,BuyRealmsScreen,CartographyTableScreen,ChatOptionsScreen,ChatReportScreen,ChatScreen,ChatSelectionScreen,ChatSelectionScreen.SelectionListWidget,ClientCommonNetworkHandler.ConfirmServerResourcePackScreen,CodeOfConductScreen,ColumnsDialogScreen,CommandBlockScreen,ConfirmLinkScreen,ConfirmScreen,ConnectScreen,ContainerWidget,ControlsListWidget,ControlsListWidget.CategoryEntry,ControlsListWidget.Entry,ControlsListWidget.KeyBindingEntry,ControlsOptionsScreen,CrafterScreen,CraftingScreen,CreateWorldScreen,CreativeInventoryScreen,CreditsAndAttributionScreen,CreditsScreen,CustomizeBuffetLevelScreen,CustomizeBuffetLevelScreen.BuffetBiomesListWidget,CustomizeFlatLevelScreen,CustomizeFlatLevelScreen.SuperflatLayersListWidget,DataPackFailureScreen,DeathScreen,DeathScreen.TitleScreenConfirmScreen,DebugOptionsScreen,DebugOptionsScreen.AbstractEntry,DebugOptionsScreen.Category,DebugOptionsScreen.Entry,DebugOptionsScreen.OptionsListWidget,DemoScreen,DialogListDialogScreen,DialogScreen,DialogScreen.WarningScreen,DirectConnectScreen,DisconnectedScreen,EditGameRulesScreen,EditGameRulesScreen.AbstractRuleWidget,EditGameRulesScreen.BooleanRuleWidget,EditGameRulesScreen.IntRuleWidget,EditGameRulesScreen.NamedRuleWidget,EditGameRulesScreen.RuleCategoryWidget,EditGameRulesScreen.RuleListWidget,EditWorldScreen,ElementListWidget,ElementListWidget.Entry,EnchantmentScreen,EntryListWidget,ExperimentalWarningScreen,ExperimentalWarningScreen.DetailsScreen,ExperimentalWarningScreen.DetailsScreen.PackListWidget,ExperimentsScreen,FatalErrorScreen,FontOptionsScreen,ForgingScreen,FurnaceScreen,GameMenuScreen,GameMenuScreen.FeedbackScreen,GameModeSwitcherScreen,GameOptionsScreen,Generic3x3ContainerScreen,GenericContainerScreen,GraphicsWarningScreen,GrindstoneScreen,HandledScreen,HangingSignEditScreen,HopperScreen,HorseScreen,InventoryScreen,JigsawBlockScreen,KeybindsScreen,LanguageOptionsScreen,LanguageOptionsScreen.LanguageSelectionListWidget,LecternScreen,LevelLoadingScreen,LoomScreen,MerchantScreen,MessageScreen,MinecartCommandBlockScreen,MouseOptionsScreen,MultiActionDialogScreen,MultiplayerScreen,MultiplayerServerListWidget,MultiplayerWarningScreen,NoticeScreen,OnlineOptionsScreen,OpenToLanScreen,OptimizeWorldScreen,OptionListWidget,OptionListWidget.OptionWidgetEntry,OptionListWidget.WidgetEntry,OptionsScreen,OutOfMemoryScreen,PackListWidget,PackScreen,PopupScreen,PresetsScreen,PresetsScreen.SuperflatPresetsListWidget,ProgressScreen,RealmsBackupInfoScreen,RealmsBackupInfoScreen.BackupInfoList,RealmsBackupScreen,RealmsBackupScreen.BackupObjectSelectionList,RealmsBackupScreen.BackupObjectSelectionListEntry,RealmsBrokenWorldScreen,RealmsClientIncompatibleScreen,RealmsConfigureWorldScreen,RealmsConfirmScreen,RealmsConnectingScreen,RealmsCreateRealmScreen,RealmsCreateWorldScreen,RealmsDownloadLatestWorldScreen,RealmsGenericErrorScreen,RealmsInviteScreen,RealmsLongRunningMcoTaskScreen,RealmsMainScreen,RealmsMainScreen.RealmSelectionList,RealmsNotificationsScreen,RealmsParentalConsentScreen,RealmsPendingInvitesScreen,RealmsPendingInvitesScreen.PendingInvitationSelectionList,RealmsPendingInvitesScreen.PendingInvitationSelectionListEntry,RealmsPlayerTab.HeaderEntry,RealmsPlayerTab.InvitedObjectSelectionList,RealmsPlayerTab.InvitedObjectSelectionListEntry,RealmsPlayerTab.PlayerTabEntry,RealmsRegionPreferenceScreen,RealmsRegionPreferenceScreen.RegionListWidget,RealmsScreen,RealmsSelectFileToUploadScreen,RealmsSelectWorldTemplateScreen,RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionList,RealmsSlotOptionsScreen,RealmsTermsScreen,RealmsUploadScreen,RecipeBookScreen,ReconfiguringScreen,RecoverWorldScreen,ReportScreen,ReportScreen.DiscardWarningScreen,Screen,ScrollableLayoutWidget.Container,SelectWorldScreen,ServerLinksDialogScreen,ShulkerBoxScreen,SignEditScreen,SimpleDialogScreen,SkinOptionsScreen,SkinReportScreen,SleepingChatScreen,SmithingScreen,SmokerScreen,SocialInteractionsPlayerListEntry,SocialInteractionsPlayerListWidget,SocialInteractionsScreen,SoundOptionsScreen,StatsScreen,StatsScreen.EntityStatsListWidget,StatsScreen.GeneralStatsListWidget,StatsScreen.ItemStatsListWidget,StatsScreen.ItemStatsListWidget.Entry,StatsScreen.ItemStatsListWidget.Header,StatsScreen.ItemStatsListWidget.StatEntry,StonecutterScreen,StructureBlockScreen,SymlinkWarningScreen,TabNavigationWidget,TaskScreen,TelemetryInfoScreen,TestBlockScreen,TestInstanceBlockScreen,TitleScreen,UsernameReportScreen,VideoOptionsScreen,WaitingForResponseScreen,WarningScreen,WorldListWidget
A GUI interface which handles keyboard and mouse callbacks for child GUI elements.
The implementation of a parent element can decide whether a child element receives keyboard and mouse callbacks.
- Mappings:
Namespace Name named net/minecraft/client/gui/ParentElementintermediary net/minecraft/class_4069official ggv
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanCallback for when a character input has been captured.children()Gets a list of all child GUI elements.private @Nullable GuiNavigationPathcomputeChildPath(ScreenRect focus, NavigationDirection direction, @Nullable Element focused, GuiNavigation navigation) private @Nullable GuiNavigationPathcomputeInitialChildPath(ScreenRect focus, NavigationDirection direction, @Nullable Element focused, GuiNavigation navigation) private @Nullable GuiNavigationPathcomputeNavigationPath(GuiNavigation.Arrow navigation) private @Nullable GuiNavigationPathcomputeNavigationPath(GuiNavigation.Tab navigation) default @Nullable GuiNavigationPathdefault @Nullable GuiNavigationPathgetNavigationPath(GuiNavigation navigation) hoveredElement(double mouseX, double mouseY) booleandefault booleandefault booleankeyPressed(KeyInput input) Callback for when a key down event has been captured.default booleankeyReleased(KeyInput input) Callback for when a key down event has been captured.default booleanmouseClicked(Click click, boolean doubled) Callback for when a mouse button down event has been captured.default booleanmouseDragged(Click click, double offsetX, double offsetY) Callback for when a mouse button drag event has been captured.default booleanmouseReleased(Click click) Callback for when a mouse button release event has been captured.default booleanmouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) Callback for when a mouse button scroll event has been captured.voidsetDragging(boolean dragging) default voidsetFocused(boolean focused) voidsetFocused(@Nullable Element focused) Methods inherited from interface net.minecraft.client.gui.Element
getBorder, getNavigationFocus, isClickable, isMouseOver, mouseMovedMethods inherited from interface net.minecraft.client.gui.navigation.Navigable
getNavigationOrder
-
Method Details
-
children
Gets a list of all child GUI elements.- Mappings:
Namespace Name Mixin selector named childrenLnet/minecraft/client/gui/ParentElement;children()Ljava/util/List;intermediary method_25396Lnet/minecraft/class_4069;method_25396()Ljava/util/List;official aJ_Lggv;aJ_()Ljava/util/List;
-
hoveredElement
- Mappings:
Namespace Name Mixin selector named hoveredElementLnet/minecraft/client/gui/ParentElement;hoveredElement(DD)Ljava/util/Optional;intermediary method_19355Lnet/minecraft/class_4069;method_19355(DD)Ljava/util/Optional;official cLggv;c(DD)Ljava/util/Optional;
-
mouseClicked
Callback for when a mouse button down event has been captured. The button number is identified by the constants inGLFWclass.- Specified by:
mouseClickedin interfaceElement- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseClickedLnet/minecraft/client/gui/Element;mouseClicked(Lnet/minecraft/client/gui/Click;Z)Zintermediary method_25402Lnet/minecraft/class_364;method_25402(Lnet/minecraft/class_11909;Z)Zofficial aLggw;a(Lgti;Z)Z
-
mouseReleased
Callback for when a mouse button release event has been captured. The button number is identified by the constants inGLFWclass.- Specified by:
mouseReleasedin interfaceElement- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseReleasedLnet/minecraft/client/gui/Element;mouseReleased(Lnet/minecraft/client/gui/Click;)Zintermediary method_25406Lnet/minecraft/class_364;method_25406(Lnet/minecraft/class_11909;)Zofficial aLggw;a(Lgti;)Z
-
mouseDragged
Callback for when a mouse button drag event has been captured. The button number is identified by the constants inGLFWclass.- Specified by:
mouseDraggedin interfaceElement- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseDraggedLnet/minecraft/client/gui/Element;mouseDragged(Lnet/minecraft/client/gui/Click;DD)Zintermediary method_25403Lnet/minecraft/class_364;method_25403(Lnet/minecraft/class_11909;DD)Zofficial aLggw;a(Lgti;DD)Z
-
isDragging
boolean isDragging()- Mappings:
Namespace Name Mixin selector named isDraggingLnet/minecraft/client/gui/ParentElement;isDragging()Zintermediary method_25397Lnet/minecraft/class_4069;method_25397()Zofficial aN_Lggv;aN_()Z
-
setDragging
void setDragging(boolean dragging) - Mappings:
Namespace Name Mixin selector named setDraggingLnet/minecraft/client/gui/ParentElement;setDragging(Z)Vintermediary method_25398Lnet/minecraft/class_4069;method_25398(Z)Vofficial c_Lggv;c_(Z)V
-
mouseScrolled
default boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) Callback for when a mouse button scroll event has been captured.- Specified by:
mouseScrolledin interfaceElement- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousehorizontalAmount- the horizontal scroll amountverticalAmount- the vertical scroll amount- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseScrolledLnet/minecraft/client/gui/Element;mouseScrolled(DDDD)Zintermediary method_25401Lnet/minecraft/class_364;method_25401(DDDD)Zofficial aLggw;a(DDDD)Z
-
keyPressed
Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Specified by:
keyPressedin interfaceElement- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyPressedLnet/minecraft/client/gui/Element;keyPressed(Lnet/minecraft/client/input/KeyInput;)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(Lnet/minecraft/class_11908;)Zofficial aLggw;a(Lgth;)Z
-
keyReleased
Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Specified by:
keyReleasedin interfaceElement- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyReleasedLnet/minecraft/client/gui/Element;keyReleased(Lnet/minecraft/client/input/KeyInput;)Zintermediary method_16803Lnet/minecraft/class_364;method_16803(Lnet/minecraft/class_11908;)Zofficial bLggw;b(Lgth;)Z
-
charTyped
Callback for when a character input has been captured. The key code is identified by the constants inGLFWclass.- Specified by:
charTypedin interfaceElement- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named charTypedLnet/minecraft/client/gui/Element;charTyped(Lnet/minecraft/client/input/CharInput;)Zintermediary method_25400Lnet/minecraft/class_364;method_25400(Lnet/minecraft/class_11905;)Zofficial aLggw;a(Lgte;)Z
-
getFocused
- Mappings:
Namespace Name Mixin selector named getFocusedLnet/minecraft/client/gui/ParentElement;getFocused()Lnet/minecraft/client/gui/Element;intermediary method_25399Lnet/minecraft/class_4069;method_25399()Lnet/minecraft/class_364;official aO_Lggv;aO_()Lggw;
-
setFocused
- Mappings:
Namespace Name Mixin selector named setFocusedLnet/minecraft/client/gui/ParentElement;setFocused(Lnet/minecraft/client/gui/Element;)Vintermediary method_25395Lnet/minecraft/class_4069;method_25395(Lnet/minecraft/class_364;)Vofficial aLggv;a(Lggw;)V
-
setFocused
default void setFocused(boolean focused) - Specified by:
setFocusedin interfaceElement- Mappings:
Namespace Name Mixin selector named setFocusedLnet/minecraft/client/gui/Element;setFocused(Z)Vintermediary method_25365Lnet/minecraft/class_364;method_25365(Z)Vofficial bLggw;b(Z)V
-
isFocused
default boolean isFocused() -
getFocusedPath
- Specified by:
getFocusedPathin interfaceElement- Mappings:
Namespace Name Mixin selector named getFocusedPathLnet/minecraft/client/gui/Element;getFocusedPath()Lnet/minecraft/client/gui/navigation/GuiNavigationPath;intermediary method_48218Lnet/minecraft/class_364;method_48218()Lnet/minecraft/class_8016;official aQ_Lggw;aQ_()Lgcz;
-