Interface ContainerEventHandler
- All Superinterfaces:
GuiEventListener,TabOrderedElement
- All Known Implementing Classes:
AbstractCommandBlockEditScreen,AbstractContainerEventHandler,AbstractContainerScreen,AbstractContainerWidget,AbstractFurnaceScreen,AbstractRecipeBookScreen,AbstractReportScreen,AbstractReportScreen.DiscardReportWarningScreen,AbstractSelectionList,AbstractSignEditScreen,AccessibilityOnboardingScreen,AccessibilityOptionsScreen,AddRealmPopupScreen,AdvancementsScreen,AlertScreen,AnvilScreen,BackupConfirmScreen,BeaconScreen,BlastFurnaceScreen,BookEditScreen,BookViewScreen,BrewingStandScreen,CartographyTableScreen,ChatOptionsScreen,ChatReportScreen,ChatScreen,ChatSelectionScreen,ChatSelectionScreen.ChatSelectionList,ClientCommonPacketListenerImpl.PackConfirmScreen,CommandBlockEditScreen,ConfigurationScreen,ConfigurationScreen.ConfigurationListScreen,ConfigurationScreen.ConfigurationListScreen.ListLabelWidget,ConfigurationScreen.ConfigurationSectionScreen,ConfigurationScreen.TooltipConfirmScreen,ConfirmExperimentalFeaturesScreen,ConfirmExperimentalFeaturesScreen.DetailsScreen,ConfirmExperimentalFeaturesScreen.DetailsScreen.PackList,ConfirmLinkScreen,ConfirmScreen,ConnectScreen,ContainerObjectSelectionList,ContainerObjectSelectionList.Entry,ContainerScreen,ControlsScreen,CrafterScreen,CraftingScreen,CreateBuffetWorldScreen,CreateBuffetWorldScreen.BiomeList,CreateFlatWorldScreen,CreateFlatWorldScreen.DetailsList,CreateWorldScreen,CreativeModeInventoryScreen,CreditsAndAttributionScreen,DatapackLoadFailureScreen,DeathScreen,DeathScreen.TitleConfirmScreen,DemoIntroScreen,DirectJoinServerScreen,DisconnectedRealmsScreen,DisconnectedScreen,DispenserScreen,EditGameRulesScreen,EditGameRulesScreen.BooleanRuleEntry,EditGameRulesScreen.CategoryRuleEntry,EditGameRulesScreen.GameRuleEntry,EditGameRulesScreen.IntegerRuleEntry,EditGameRulesScreen.RuleEntry,EditGameRulesScreen.RuleList,EditServerScreen,EditWorldScreen,EnchantmentScreen,ErrorScreen,ExperimentsScreen,ExperimentsScreen.ScrollArea,FontOptionsScreen,FurnaceScreen,GameModeSwitcherScreen,GenericMessageScreen,GenericWaitingScreen,GrindstoneScreen,HangingSignEditScreen,HopperScreen,HorseInventoryScreen,InBedChatScreen,InventoryScreen,ItemCombinerScreen,JigsawBlockEditScreen,JoinMultiplayerScreen,KeyBindsList,KeyBindsList.CategoryEntry,KeyBindsList.Entry,KeyBindsList.KeyEntry,KeyBindsScreen,LanguageSelectScreen,LanguageSelectScreen.LanguageSelectionList,LecternScreen,LevelLoadingScreen,LoadingErrorScreen,LoadingErrorScreen.LoadingEntryList,LoomScreen,MerchantScreen,MinecartCommandBlockEditScreen,ModListScreen,ModListScreen.InfoPanel,ModListWidget,ModMismatchDisconnectedScreen,ModMismatchDisconnectedScreen.MismatchInfoPanel,MouseSettingsScreen,NameReportScreen,NoticeWithLinkScreen,ObjectSelectionList,OnlineOptionsScreen,OptimizeWorldScreen,OptionsList,OptionsList.Entry,OptionsList.OptionEntry,OptionsScreen,OptionsSubScreen,OutOfMemoryScreen,PackSelectionScreen,PauseScreen,PauseScreen.FeedbackSubScreen,PlayerEntry,PopupScreen,PresetFlatWorldScreen,PresetFlatWorldScreen.PresetsList,ProgressScreen,RealmsBackupInfoScreen,RealmsBackupInfoScreen.BackupInfoList,RealmsBackupScreen,RealmsBackupScreen.BackupObjectSelectionList,RealmsBackupScreen.Entry,RealmsBrokenWorldScreen,RealmsClientOutdatedScreen,RealmsConfigureWorldScreen,RealmsConfirmScreen,RealmsCreateRealmScreen,RealmsDownloadLatestWorldScreen,RealmsGenericErrorScreen,RealmsInviteScreen,RealmsLongRunningMcoTaskScreen,RealmsLongRunningMcoTickTaskScreen,RealmsMainScreen,RealmsMainScreen.RealmSelectionList,RealmsNotificationsScreen,RealmsParentalConsentScreen,RealmsPendingInvitesScreen,RealmsPendingInvitesScreen.PendingInvitationSelectionList,RealmsPlayerScreen,RealmsPlayerScreen.Entry,RealmsPlayerScreen.InvitedObjectSelectionList,RealmsResetWorldScreen,RealmsScreen,RealmsSelectFileToUploadScreen,RealmsSelectFileToUploadScreen.WorldSelectionList,RealmsSelectWorldTemplateScreen,RealmsSelectWorldTemplateScreen.WorldTemplateList,RealmsSettingsScreen,RealmsSlotOptionsScreen,RealmsSubscriptionInfoScreen,RealmsTermsScreen,RealmsUploadScreen,ReceivingLevelScreen,RecoverWorldDataScreen,ReportPlayerScreen,ReportReasonSelectionScreen,ReportReasonSelectionScreen.ReasonSelectionList,SafetyScreen,Screen,ScrollPanel,SelectWorldScreen,ServerLinksScreen,ServerLinksScreen.LinkList,ServerLinksScreen.LinkListEntry,ServerReconfigScreen,ServerSelectionList,ShareToLanScreen,ShulkerBoxScreen,SignEditScreen,SkinCustomizationScreen,SkinReportScreen,SmithingScreen,SmokerScreen,SocialInteractionsPlayerList,SocialInteractionsScreen,SoundOptionsScreen,StatsScreen,StatsScreen.GeneralStatisticsList,StatsScreen.ItemStatisticsList,StatsScreen.MobsStatisticsList,StonecutterScreen,StructureBlockEditScreen,TabNavigationBar,TelemetryInfoScreen,TitleScreen,TransferableSelectionList,UnsupportedGraphicsWarningScreen,VideoSettingsScreen,WarningScreen,WinScreen,WorldSelectionList
-
Field Summary
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancharTyped(char pCodePoint, int pModifiers) Called when a character is typed within the GUI element.List<? extends GuiEventListener> children()default Optional<GuiEventListener> getChildAt(double pMouseX, double pMouseY) Returns the first event listener that intersects with the mouse coordinates.default ComponentPathprivate ComponentPathhandleArrowNavigation(FocusNavigationEvent.ArrowNavigation pArrowNavigation) Handles arrow-based navigation events.private ComponentPathhandleTabNavigation(FocusNavigationEvent.TabNavigation pTabNavigation) Handles tab-based navigation events.booleandefault booleandefault booleankeyPressed(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.default booleankeyReleased(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is released within the GUI element.default booleanmouseClicked(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.default booleanmouseDragged(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY) Called when the mouse is dragged within the GUI element.default booleanmouseReleased(double pMouseX, double pMouseY, int pButton) Called when a mouse button is released within the GUI element.default booleanmouseScrolled(double p_94686_, double p_94687_, double p_94688_, double p_294830_) default ComponentPathnextFocusPath(FocusNavigationEvent p_265668_) Retrieves the next focus path based on the given focus navigation event.private ComponentPathnextFocusPathInDirection(ScreenRectangle pRectangle, ScreenDirection pDirection, GuiEventListener pListener, FocusNavigationEvent pEvent) Calculates the next focus path in a specific direction.private ComponentPathnextFocusPathVaguelyInDirection(ScreenRectangle pRectangle, ScreenDirection pDirection, GuiEventListener pListener, FocusNavigationEvent pEvent) Calculates the next focus path in a vague direction.voidsetDragging(boolean pIsDragging) Sets if the GUI element is dragging or not.default voidsetFocused(boolean p_265504_) Sets the focus state of the GUI element.voidsetFocused(GuiEventListener pFocused) Sets the focus state of the GUI element.Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, getRectangle, isMouseOver, mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Method Details
-
children
List<? extends GuiEventListener> children() -
getChildAt
Returns the first event listener that intersects with the mouse coordinates. -
mouseClicked
default boolean mouseClicked(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.- Specified by:
mouseClickedin interfaceGuiEventListener- Parameters:
pMouseX- the X coordinate of the mouse.pMouseY- the Y coordinate of the mouse.pButton- the button that was clicked.- Returns:
trueif the event is consumed,falseotherwise.
-
mouseReleased
default boolean mouseReleased(double pMouseX, double pMouseY, int pButton) Called when a mouse button is released within the GUI element.- Specified by:
mouseReleasedin interfaceGuiEventListener- Parameters:
pMouseX- the X coordinate of the mouse.pMouseY- the Y coordinate of the mouse.pButton- the button that was released.- Returns:
trueif the event is consumed,falseotherwise.
-
mouseDragged
default boolean mouseDragged(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY) Called when the mouse is dragged within the GUI element.- Specified by:
mouseDraggedin interfaceGuiEventListener- Parameters:
pMouseX- the X coordinate of the mouse.pMouseY- the Y coordinate of the mouse.pButton- the button that is being dragged.pDragX- the X distance of the drag.pDragY- the Y distance of the drag.- Returns:
trueif the event is consumed,falseotherwise.
-
isDragging
boolean isDragging() -
setDragging
void setDragging(boolean pIsDragging) Sets if the GUI element is dragging or not.- Parameters:
pIsDragging- the dragging state of the GUI element.
-
mouseScrolled
default boolean mouseScrolled(double p_94686_, double p_94687_, double p_94688_, double p_294830_) - Specified by:
mouseScrolledin interfaceGuiEventListener
-
keyPressed
default boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.- Specified by:
keyPressedin interfaceGuiEventListener- Parameters:
pKeyCode- the key code of the pressed key.pScanCode- the scan code of the pressed key.pModifiers- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
keyReleased
default boolean keyReleased(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is released within the GUI element.- Specified by:
keyReleasedin interfaceGuiEventListener- Parameters:
pKeyCode- the key code of the released key.pScanCode- the scan code of the released key.pModifiers- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
charTyped
default boolean charTyped(char pCodePoint, int pModifiers) Called when a character is typed within the GUI element.- Specified by:
charTypedin interfaceGuiEventListener- Parameters:
pCodePoint- the code point of the typed character.pModifiers- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
getFocused
-
setFocused
Sets the focus state of the GUI element.- Parameters:
pFocused- the focused GUI element.
-
setFocused
default void setFocused(boolean p_265504_) Sets the focus state of the GUI element.- Specified by:
setFocusedin interfaceGuiEventListener- Parameters:
p_265504_-trueto apply focus,falseto remove focus
-
isFocused
default boolean isFocused()- Specified by:
isFocusedin interfaceGuiEventListener
-
getCurrentFocusPath
- Specified by:
getCurrentFocusPathin interfaceGuiEventListener
-