Class ModListWidget.ModEntry
java.lang.Object
net.minecraft.client.gui.components.AbstractSelectionList.Entry<ModListWidget.ModEntry>
net.minecraft.client.gui.components.ObjectSelectionList.Entry<ModListWidget.ModEntry>
net.neoforged.neoforge.client.gui.widget.ModListWidget.ModEntry
- All Implemented Interfaces:
GuiEventListener
,TabOrderedElement
,NarrationSupplier
- Enclosing class:
ModListWidget
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final net.neoforged.fml.ModContainer
private final ModListScreen
Fields inherited from class net.minecraft.client.gui.components.AbstractSelectionList.Entry
list
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.neoforged.fml.ModContainer
net.neoforged.neoforgespi.language.IModInfo
getInfo()
boolean
boolean
mouseClicked
(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_) Called when a mouse button is clicked within the GUI element.void
render
(GuiGraphics guiGraphics, int entryIdx, int top, int left, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean isMouseOver, float partialTick) void
setFocused
(boolean focused) Sets the focus state of the GUI element.Methods inherited from class net.minecraft.client.gui.components.ObjectSelectionList.Entry
updateNarration
Methods inherited from class net.minecraft.client.gui.components.AbstractSelectionList.Entry
isMouseOver, renderBack
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.GuiEventListener
charTyped, getCurrentFocusPath, getRectangle, keyPressed, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPath
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
container
private final net.neoforged.fml.ModContainer container -
parent
-
-
Constructor Details
-
ModEntry
ModEntry(net.neoforged.fml.ModContainer info, ModListScreen parent)
-
-
Method Details
-
getNarration
- Specified by:
getNarration
in classObjectSelectionList.Entry<ModListWidget.ModEntry>
-
render
public void render(GuiGraphics guiGraphics, int entryIdx, int top, int left, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean isMouseOver, float partialTick) - Specified by:
render
in classAbstractSelectionList.Entry<ModListWidget.ModEntry>
-
mouseClicked
public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_) Description copied from interface:GuiEventListener
Called when a mouse button is clicked within the GUI element.- Specified by:
mouseClicked
in interfaceGuiEventListener
- Overrides:
mouseClicked
in classObjectSelectionList.Entry<ModListWidget.ModEntry>
- Parameters:
p_mouseClicked_1_
- the X coordinate of the mouse.p_mouseClicked_3_
- the Y coordinate of the mouse.p_mouseClicked_5_
- the button that was clicked.- Returns:
true
if the event is consumed,false
otherwise.
-
setFocused
public void setFocused(boolean focused) Description copied from class:AbstractSelectionList.Entry
Sets the focus state of the GUI element.- Specified by:
setFocused
in interfaceGuiEventListener
- Overrides:
setFocused
in classAbstractSelectionList.Entry<ModListWidget.ModEntry>
- Parameters:
focused
-true
to apply focus,false
to remove focus
-
isFocused
public boolean isFocused()- Specified by:
isFocused
in interfaceGuiEventListener
- Overrides:
isFocused
in classAbstractSelectionList.Entry<ModListWidget.ModEntry>
-
getInfo
public net.neoforged.neoforgespi.language.IModInfo getInfo() -
getContainer
public net.neoforged.fml.ModContainer getContainer()
-