Interface Element

All Superinterfaces:
Navigable
All Known Subinterfaces:
ParentElement
All Known Implementing Classes:
AbstractCommandBlockScreen, AbstractCraftingRecipeBookWidget, AbstractFurnaceRecipeBookWidget, AbstractFurnaceScreen, AbstractParentElement, AbstractSignEditScreen, AbstractTextWidget, AbuseReportReasonScreen, AbuseReportReasonScreen.ReasonListWidget, AbuseReportReasonScreen.ReasonListWidget.ReasonEntry, AbuseReportTypeScreen, AccessibilityOnboardingScreen, AccessibilityOptionsScreen, AddServerScreen, AdvancementsScreen, AlwaysSelectedEntryListWidget, AlwaysSelectedEntryListWidget.Entry, AnimatedResultButton, AnvilScreen, BackupPromptScreen, BeaconScreen, BeaconScreen.BaseButtonWidget, BeaconScreen.CancelButtonWidget, BeaconScreen.DoneButtonWidget, BeaconScreen.EffectButtonWidget, BeaconScreen.IconButtonWidget, BeaconScreen.LevelTwoEffectButtonWidget, BlastFurnaceScreen, BookEditScreen, BookScreen, BookSigningScreen, BrewingStandScreen, ButtonWidget, BuyRealmsScreen, CartographyTableScreen, ChatOptionsScreen, ChatReportScreen, ChatScreen, ChatSelectionScreen, ChatSelectionScreen.SelectionListWidget, ChatSelectionScreen.SelectionListWidget.Entry, ChatSelectionScreen.SelectionListWidget.MessageEntry, ChatSelectionScreen.SelectionListWidget.SenderEntry, ChatSelectionScreen.SelectionListWidget.SeparatorEntry, ChatSelectionScreen.SelectionListWidget.TextEntry, CheckboxWidget, ClickableWidget, 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, CustomizeBuffetLevelScreen.BuffetBiomesListWidget.BuffetBiomeItem, CustomizeFlatLevelScreen, CustomizeFlatLevelScreen.SuperflatLayersListWidget, CustomizeFlatLevelScreen.SuperflatLayersListWidget.Entry, CustomizeFlatLevelScreen.SuperflatLayersListWidget.HeaderEntry, CustomizeFlatLevelScreen.SuperflatLayersListWidget.SuperflatLayerEntry, CyclingButtonWidget, DataPackFailureScreen, DeathScreen, DeathScreen.TitleScreenConfirmScreen, DebugOptionsScreen, DebugOptionsScreen.AbstractEntry, DebugOptionsScreen.Category, DebugOptionsScreen.Entry, DebugOptionsScreen.OptionsListWidget, DemoScreen, DialogListDialogScreen, DialogScreen, DialogScreen.WarningScreen, DirectConnectScreen, DisconnectedScreen, EditBoxWidget, EditGameRulesScreen, EditGameRulesScreen.AbstractRuleWidget, EditGameRulesScreen.BooleanRuleWidget, EditGameRulesScreen.IntRuleWidget, EditGameRulesScreen.NamedRuleWidget, EditGameRulesScreen.RuleCategoryWidget, EditGameRulesScreen.RuleListWidget, EditWorldScreen, ElementListWidget, ElementListWidget.Entry, EnchantmentScreen, EntryListWidget, EntryListWidget.Entry, ExperimentalWarningScreen, ExperimentalWarningScreen.DetailsScreen, ExperimentalWarningScreen.DetailsScreen.PackListWidget, ExperimentalWarningScreen.DetailsScreen.PackListWidgetEntry, ExperimentsScreen, FatalErrorScreen, FontOptionsScreen, ForgingScreen, FurnaceScreen, GameMenuScreen, GameMenuScreen.FeedbackScreen, GameModeSwitcherScreen, GameModeSwitcherScreen.ButtonWidget, GameOptionsScreen, Generic3x3ContainerScreen, GenericContainerScreen, GraphicsWarningScreen, GrindstoneScreen, HandledScreen, HangingSignEditScreen, HopperScreen, HorseScreen, IconWidget, IconWidget.Simple, IconWidget.Texture, InputControlHandlers.NumberRangeInputControlHandler.RangeSliderWidget, InventoryScreen, ItemStackWidget, JigsawBlockScreen, KeybindsScreen, LanguageOptionsScreen, LanguageOptionsScreen.LanguageSelectionListWidget, LanguageOptionsScreen.LanguageSelectionListWidget.LanguageEntry, LecternScreen, LevelLoadingScreen, LoadingWidget, LockButtonWidget, LoomScreen, MerchantScreen, MerchantScreen.WidgetButtonPage, MessageScreen, MinecartCommandBlockScreen, MouseOptionsScreen, MultiActionDialogScreen, MultilineTextWidget, MultiplayerScreen, MultiplayerServerListWidget, MultiplayerServerListWidget.Entry, MultiplayerServerListWidget.LanServerEntry, MultiplayerServerListWidget.ScanningEntry, MultiplayerServerListWidget.ServerEntry, MultiplayerWarningScreen, NarratedMultilineTextWidget, NoticeScreen, OnlineOptionsScreen, OpenToLanScreen, OptimizeWorldScreen, OptionListWidget, OptionListWidget.OptionWidgetEntry, OptionListWidget.WidgetEntry, OptionSliderWidget, OptionsScreen, OutOfMemoryScreen, PackListWidget, PackListWidget.Entry, PackListWidget.HeaderEntry, PackListWidget.ResourcePackEntry, PackScreen, PageTurnWidget, PlayerSkinWidget, PopupScreen, PresetsScreen, PresetsScreen.SuperflatPresetsListWidget, PresetsScreen.SuperflatPresetsListWidget.SuperflatPresetEntry, PressableTextWidget, PressableWidget, ProgressScreen, RealmsBackupInfoScreen, RealmsBackupInfoScreen.BackupInfoList, RealmsBackupInfoScreen.BackupInfoListEntry, RealmsBackupScreen, RealmsBackupScreen.BackupObjectSelectionList, RealmsBackupScreen.BackupObjectSelectionListEntry, RealmsBrokenWorldScreen, RealmsClientIncompatibleScreen, RealmsConfigureWorldScreen, RealmsConfirmScreen, RealmsConnectingScreen, RealmsCreateRealmScreen, RealmsCreateWorldScreen, RealmsCreateWorldScreen.FrameButton, RealmsDownloadLatestWorldScreen, RealmsGenericErrorScreen, RealmsInviteScreen, RealmsLongRunningMcoTaskScreen, RealmsMainScreen, RealmsMainScreen.CrossButton, RealmsMainScreen.Entry, RealmsMainScreen.NotificationButtonWidget, RealmsMainScreen.ParentRealmSelectionListEntry, RealmsMainScreen.RealmSelectionList, RealmsMainScreen.RealmSelectionListEntry, RealmsMainScreen.SnapshotEntry, RealmsMainScreen.VisitUrlNotification, RealmsNotificationsScreen, RealmsParentalConsentScreen, RealmsPendingInvitesScreen, RealmsPendingInvitesScreen.PendingInvitationSelectionList, RealmsPendingInvitesScreen.PendingInvitationSelectionListEntry, RealmsPlayerTab.HeaderEntry, RealmsPlayerTab.InvitedObjectSelectionList, RealmsPlayerTab.InvitedObjectSelectionListEntry, RealmsPlayerTab.PlayerTabEntry, RealmsRegionPreferenceScreen, RealmsRegionPreferenceScreen.RegionListWidget, RealmsRegionPreferenceScreen.RegionListWidget.RegionEntry, RealmsScreen, RealmsSelectFileToUploadScreen, RealmsSelectWorldTemplateScreen, RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionList, RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionListEntry, RealmsSlotOptionsScreen, RealmsSlotOptionsScreen.SettingsSlider, RealmsTermsScreen, RealmsUploadScreen, RealmsWorldSlotButton, RecipeAlternativesWidget, RecipeAlternativesWidget.AlternativeButtonWidget, RecipeAlternativesWidget.CraftingAlternativeButtonWidget, RecipeAlternativesWidget.FurnaceAlternativeButtonWidget, RecipeBookScreen, RecipeBookWidget, RecipeGroupButtonWidget, ReconfiguringScreen, RecoverWorldScreen, ReportScreen, ReportScreen.DiscardWarningScreen, Screen, ScrollableLayoutWidget.Container, ScrollableTextFieldWidget, ScrollableTextWidget, ScrollableWidget, SelectWorldScreen, ServerLinksDialogScreen, ShulkerBoxScreen, SignEditScreen, SimpleDialogScreen, SimpleOption.OptionSliderWidgetImpl, SkinOptionsScreen, SkinReportScreen, SleepingChatScreen, SliderWidget, SmithingScreen, SmokerScreen, SocialInteractionsPlayerListEntry, SocialInteractionsPlayerListWidget, SocialInteractionsScreen, SoundOptionsScreen, StatsScreen, StatsScreen.EntityStatsListWidget, StatsScreen.EntityStatsListWidget.Entry, StatsScreen.GeneralStatsListWidget, StatsScreen.GeneralStatsListWidget.Entry, StatsScreen.ItemStatsListWidget, StatsScreen.ItemStatsListWidget.Entry, StatsScreen.ItemStatsListWidget.Header, StatsScreen.ItemStatsListWidget.Header.HeaderButton, StatsScreen.ItemStatsListWidget.StatEntry, StatsScreen.ItemStatsListWidget.StatEntry.ItemStackInSlotWidget, StonecutterScreen, StructureBlockScreen, SymlinkWarningScreen, TabButtonWidget, TabNavigationWidget, TaskScreen, TelemetryEventWidget, TelemetryInfoScreen, TestBlockScreen, TestInstanceBlockScreen, TextFieldWidget, TextIconButtonWidget, TextIconButtonWidget.IconOnly, TextIconButtonWidget.WithText, TexturedButtonWidget, TextWidget, TitleScreen, ToggleButtonWidget, UsernameReportScreen, VideoOptionsScreen, WaitingForResponseScreen, WarningScreen, WorldListWidget, WorldListWidget.EmptyListEntry, WorldListWidget.Entry, WorldListWidget.LoadingEntry, WorldListWidget.WorldEntry

@Environment(CLIENT) public interface Element extends Navigable
Base GUI interface for handling callbacks related to keyboard or mouse actions. Mouse coordinate is bounded by the size of the window in pixels.
Mappings:
Namespace Name
named net/minecraft/client/gui/Element
intermediary net/minecraft/class_364
official ggw
  • Method Details

    • mouseMoved

      default void mouseMoved(double mouseX, double mouseY)
      Callback for when a mouse move event has been captured.
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named mouseMoved Lnet/minecraft/client/gui/Element;mouseMoved(DD)V
      intermediary method_16014 Lnet/minecraft/class_364;method_16014(DD)V
      official d Lggw;d(DD)V
    • mouseClicked

      default boolean mouseClicked(Click click, boolean doubled)
      Callback for when a mouse button down event has been captured. The button number is identified by the constants in GLFW class.
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named mouseClicked Lnet/minecraft/client/gui/Element;mouseClicked(Lnet/minecraft/client/gui/Click;Z)Z
      intermediary method_25402 Lnet/minecraft/class_364;method_25402(Lnet/minecraft/class_11909;Z)Z
      official a Lggw;a(Lgti;Z)Z
    • mouseReleased

      default boolean mouseReleased(Click click)
      Callback for when a mouse button release event has been captured. The button number is identified by the constants in GLFW class.
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named mouseReleased Lnet/minecraft/client/gui/Element;mouseReleased(Lnet/minecraft/client/gui/Click;)Z
      intermediary method_25406 Lnet/minecraft/class_364;method_25406(Lnet/minecraft/class_11909;)Z
      official a Lggw;a(Lgti;)Z
    • mouseDragged

      default boolean mouseDragged(Click click, double offsetX, double offsetY)
      Callback for when a mouse button drag event has been captured. The button number is identified by the constants in GLFW class.
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named mouseDragged Lnet/minecraft/client/gui/Element;mouseDragged(Lnet/minecraft/client/gui/Click;DD)Z
      intermediary method_25403 Lnet/minecraft/class_364;method_25403(Lnet/minecraft/class_11909;DD)Z
      official a Lggw;a(Lgti;DD)Z
    • mouseScrolled

      default boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount)
      Callback for when a mouse button scroll event has been captured.
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      horizontalAmount - the horizontal scroll amount
      verticalAmount - the vertical scroll amount
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named mouseScrolled Lnet/minecraft/client/gui/Element;mouseScrolled(DDDD)Z
      intermediary method_25401 Lnet/minecraft/class_364;method_25401(DDDD)Z
      official a Lggw;a(DDDD)Z
    • keyPressed

      default boolean keyPressed(KeyInput input)
      Callback for when a key down event has been captured. The key code is identified by the constants in GLFW class.
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named keyPressed Lnet/minecraft/client/gui/Element;keyPressed(Lnet/minecraft/client/input/KeyInput;)Z
      intermediary method_25404 Lnet/minecraft/class_364;method_25404(Lnet/minecraft/class_11908;)Z
      official a Lggw;a(Lgth;)Z
    • keyReleased

      default boolean keyReleased(KeyInput input)
      Callback for when a key down event has been captured. The key code is identified by the constants in GLFW class.
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named keyReleased Lnet/minecraft/client/gui/Element;keyReleased(Lnet/minecraft/client/input/KeyInput;)Z
      intermediary method_16803 Lnet/minecraft/class_364;method_16803(Lnet/minecraft/class_11908;)Z
      official b Lggw;b(Lgth;)Z
    • charTyped

      default boolean charTyped(CharInput input)
      Callback for when a character input has been captured. The key code is identified by the constants in GLFW class.
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named charTyped Lnet/minecraft/client/gui/Element;charTyped(Lnet/minecraft/client/input/CharInput;)Z
      intermediary method_25400 Lnet/minecraft/class_364;method_25400(Lnet/minecraft/class_11905;)Z
      official a Lggw;a(Lgte;)Z
    • getNavigationPath

      @Nullable default @Nullable GuiNavigationPath getNavigationPath(GuiNavigation navigation)
      Mappings:
      Namespace Name Mixin selector
      named getNavigationPath Lnet/minecraft/client/gui/Element;getNavigationPath(Lnet/minecraft/client/gui/navigation/GuiNavigation;)Lnet/minecraft/client/gui/navigation/GuiNavigationPath;
      intermediary method_48205 Lnet/minecraft/class_364;method_48205(Lnet/minecraft/class_8023;)Lnet/minecraft/class_8016;
      official a Lggw;a(Lgjq;)Lgcz;
    • isMouseOver

      default boolean isMouseOver(double mouseX, double mouseY)
      Checks if the mouse position is within the bound of the element.
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      Returns:
      true if the mouse is within the bound of the element, otherwise false
      Mappings:
      Namespace Name Mixin selector
      named isMouseOver Lnet/minecraft/client/gui/Element;isMouseOver(DD)Z
      intermediary method_25405 Lnet/minecraft/class_364;method_25405(DD)Z
      official a_ Lggw;a_(DD)Z
    • setFocused

      void setFocused(boolean focused)
      Mappings:
      Namespace Name Mixin selector
      named setFocused Lnet/minecraft/client/gui/Element;setFocused(Z)V
      intermediary method_25365 Lnet/minecraft/class_364;method_25365(Z)V
      official b Lggw;b(Z)V
    • isFocused

      boolean isFocused()
      Mappings:
      Namespace Name Mixin selector
      named isFocused Lnet/minecraft/client/gui/Element;isFocused()Z
      intermediary method_25370 Lnet/minecraft/class_364;method_25370()Z
      official aP_ Lggw;aP_()Z
    • isClickable

      default boolean isClickable()
      Mappings:
      Namespace Name Mixin selector
      named isClickable Lnet/minecraft/client/gui/Element;isClickable()Z
      intermediary method_72784 Lnet/minecraft/class_364;method_72784()Z
      official G Lggw;G()Z
    • getFocusedPath

      @Nullable default @Nullable GuiNavigationPath getFocusedPath()
      Mappings:
      Namespace Name Mixin selector
      named getFocusedPath Lnet/minecraft/client/gui/Element;getFocusedPath()Lnet/minecraft/client/gui/navigation/GuiNavigationPath;
      intermediary method_48218 Lnet/minecraft/class_364;method_48218()Lnet/minecraft/class_8016;
      official aQ_ Lggw;aQ_()Lgcz;
    • getNavigationFocus

      default ScreenRect getNavigationFocus()
      Mappings:
      Namespace Name Mixin selector
      named getNavigationFocus Lnet/minecraft/client/gui/Element;getNavigationFocus()Lnet/minecraft/client/gui/ScreenRect;
      intermediary method_48202 Lnet/minecraft/class_364;method_48202()Lnet/minecraft/class_8030;
      official aV_ Lggw;aV_()Lgju;
    • getBorder

      default ScreenRect getBorder(NavigationDirection direction)
      Mappings:
      Namespace Name Mixin selector
      named getBorder Lnet/minecraft/client/gui/Element;getBorder(Lnet/minecraft/client/gui/navigation/NavigationDirection;)Lnet/minecraft/client/gui/ScreenRect;
      intermediary method_65515 Lnet/minecraft/class_364;method_65515(Lnet/minecraft/class_8028;)Lnet/minecraft/class_8030;
      official a_ Lggw;a_(Lgjs;)Lgju;