Class EnchantWidget.Empty
java.lang.Object
johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget
johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget.Empty
- Enclosing class:
EnchantWidget
A non-interactable filler widget used to pad the Enchantment Screen's list view
when there are fewer active enchantment contexts available than the current page size.
-
Nested Class Summary
Nested classes/interfaces inherited from class johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget
EnchantWidget.Available, EnchantWidget.Empty, EnchantWidget.Locked, EnchantWidget.Maxed, EnchantWidget.Overleveled -
Field Summary
Fields inherited from class johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget
DISABLED_LEVEL_SPRITES, ENABLED_LEVEL_SPRITES, GALACTIC_FONT_ID, isHovered, layout, onPressAction, state, texIndex, usePlainBackground, x, y -
Constructor Summary
ConstructorsConstructorDescriptionEmpty(int x, int y, EnchantRenderState state, int texIndex, boolean usePlainBackground, Runnable onPressAction) Constructs a new EnchantWidget.Empty. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmouseClicked(double mouseX, double mouseY, int button) Denies all click interactions for empty widgets.protected voidrenderWidget(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY, float partialTick) Renders a blank, disabled background texture as a placeholder.Methods inherited from class johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget
drawScrollingString, getFormattedEnchantmentName, getState, render, setOnPressAction, setState, setTexIndex, updatePosition
-
Constructor Details
-
Method Details
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) Denies all click interactions for empty widgets.- Overrides:
mouseClickedin classEnchantWidget- Parameters:
mouseX- The X coordinate of the mouse pointer.mouseY- The Y coordinate of the mouse pointer.button- The mouse button pressed.- Returns:
- Always false.
-
renderWidget
protected void renderWidget(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY, float partialTick) Renders a blank, disabled background texture as a placeholder. Defaults to the Table Source's disabled texture style for aesthetic consistency.- Specified by:
renderWidgetin classEnchantWidget- Parameters:
context- The GUI graphics context to draw to.mouseX- The current mouse X coordinate.mouseY- The current mouse Y coordinate.partialTick- The partial tick time for animations.
-