Class EnchantWidget.Maxed
java.lang.Object
johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget
johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget.Maxed
- Enclosing class:
EnchantWidget
Represents a non-interactable enchantment slot where the target item's enchantment
has reached its natural maximum level.
This widget provides visual feedback to the player that no further standard upgrades are possible for this specific enchantment, utilizing a distinct texture and text color.
-
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
ConstructorsConstructorDescriptionMaxed(int x, int y, EnchantRenderState state, int texIndex, boolean usePlainBackground, Runnable onPressAction) Constructs a new EnchantWidget.Maxed. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmouseClicked(double mouseX, double mouseY, int button) Denies all interaction with this widget, as maxed enchantments cannot be upgraded.protected voidrenderWidget(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY, float partialTick) Renders the distinct maxed-out background texture and text.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 interaction with this widget, as maxed enchantments cannot be upgraded.- Overrides:
mouseClickedin classEnchantWidget- Parameters:
mouseX- The X coordinate of the mouse pointer.mouseY- The Y coordinate of the mouse pointer.button- The mouse button being pressed.- Returns:
- Always false.
-
renderWidget
protected void renderWidget(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY, float partialTick) Renders the distinct maxed-out background texture and text.- Specified by:
renderWidgetin classEnchantWidget- Parameters:
context- The GUI graphics context.mouseX- The current mouse X coordinate.mouseY- The current mouse Y coordinate.partialTick- The partial tick time for animations.
-