Class AbstractContainerWidget
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractContainerWidget
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
,NarratableEntry
,NarrationSupplier
- Direct Known Subclasses:
FrameWidget
,GridWidget
,LinearLayoutWidget
public abstract class AbstractContainerWidget
extends AbstractWidget
implements ContainerEventHandler
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionAbstractContainerWidget
(int p_254009_, int p_254384_, int p_254479_, int p_254140_, Component p_254161_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
changeFocus
(boolean p_254016_) List<? extends GuiEventListener>
children()
getChildAt
(double p_254552_, double p_253874_) protected abstract List<? extends AbstractWidget>
protected GuiEventListener
boolean
boolean
isMouseOver
(double p_253720_, double p_254125_) boolean
mouseClicked
(double p_253616_, double p_254012_, int p_254048_) boolean
mouseDragged
(double p_253786_, double p_254228_, int p_254486_, double p_254182_, double p_254329_) void
mouseMoved
(double p_253612_, double p_253828_) boolean
mouseReleased
(double p_253760_, double p_253738_, int p_254511_) boolean
mouseScrolled
(double p_253702_, double p_254077_, double p_254162_) void
renderButton
(PoseStack p_254455_, int p_254289_, int p_253627_, float p_254198_) void
setDragging
(boolean p_254253_) void
setFocused
(GuiEventListener p_254365_) void
setX
(int p_253732_) void
setY
(int p_253703_) void
updateWidgetNarration
(NarrationElementOutput p_253937_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createNarrationMessage, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getX, getY, getYImage, isActive, isFocused, isHoveredOrFocused, isValidClickButton, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBg, setAlpha, setFGColor, setFocused, setHeight, setMessage, setPosition, setTooltip, setTooltipDelay, setWidth, updateNarration, wrapDefaultNarrationMessage
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, keyPressed, keyReleased, magicalSpecialHackyFocus, setInitialFocus
-
Field Details
-
focused
-
dragging
private boolean dragging
-
-
Constructor Details
-
AbstractContainerWidget
public AbstractContainerWidget(int p_254009_, int p_254384_, int p_254479_, int p_254140_, Component p_254161_)
-
-
Method Details
-
renderButton
- Overrides:
renderButton
in classAbstractWidget
-
isMouseOver
public boolean isMouseOver(double p_253720_, double p_254125_) - Specified by:
isMouseOver
in interfaceGuiEventListener
- Overrides:
isMouseOver
in classAbstractWidget
-
mouseMoved
public void mouseMoved(double p_253612_, double p_253828_) - Specified by:
mouseMoved
in interfaceGuiEventListener
-
children
- Specified by:
children
in interfaceContainerEventHandler
-
getContainedChildren
-
isDragging
public boolean isDragging()- Specified by:
isDragging
in interfaceContainerEventHandler
-
setDragging
public void setDragging(boolean p_254253_) - Specified by:
setDragging
in interfaceContainerEventHandler
-
mouseScrolled
public boolean mouseScrolled(double p_253702_, double p_254077_, double p_254162_) - Specified by:
mouseScrolled
in interfaceContainerEventHandler
- Specified by:
mouseScrolled
in interfaceGuiEventListener
-
changeFocus
public boolean changeFocus(boolean p_254016_) - Specified by:
changeFocus
in interfaceContainerEventHandler
- Specified by:
changeFocus
in interfaceGuiEventListener
- Overrides:
changeFocus
in classAbstractWidget
-
getHovered
-
getFocused
- Specified by:
getFocused
in interfaceContainerEventHandler
-
setFocused
- Specified by:
setFocused
in interfaceContainerEventHandler
-
updateWidgetNarration
- Specified by:
updateWidgetNarration
in classAbstractWidget
-
narrationPriority
- Specified by:
narrationPriority
in interfaceNarratableEntry
- Overrides:
narrationPriority
in classAbstractWidget
-
setX
public void setX(int p_253732_) - Overrides:
setX
in classAbstractWidget
-
setY
public void setY(int p_253703_) - Overrides:
setY
in classAbstractWidget
-
getChildAt
- Specified by:
getChildAt
in interfaceContainerEventHandler
-
mouseClicked
public boolean mouseClicked(double p_253616_, double p_254012_, int p_254048_) - Specified by:
mouseClicked
in interfaceContainerEventHandler
- Specified by:
mouseClicked
in interfaceGuiEventListener
- Overrides:
mouseClicked
in classAbstractWidget
-
mouseReleased
public boolean mouseReleased(double p_253760_, double p_253738_, int p_254511_) - Specified by:
mouseReleased
in interfaceContainerEventHandler
- Specified by:
mouseReleased
in interfaceGuiEventListener
- Overrides:
mouseReleased
in classAbstractWidget
-
mouseDragged
public boolean mouseDragged(double p_253786_, double p_254228_, int p_254486_, double p_254182_, double p_254329_) - Specified by:
mouseDragged
in interfaceContainerEventHandler
- Specified by:
mouseDragged
in interfaceGuiEventListener
- Overrides:
mouseDragged
in classAbstractWidget
-