Class EnchantWidget.Overleveled
java.lang.Object
johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget
johnsmith.enchantingoverhauled.client.gui.widget.enchant.EnchantWidget.Overleveled
- Enclosing class:
EnchantWidget
Represents a non-interactable enchantment slot where the target item's enchantment
exceeds its natural maximum level (e.g., pushed beyond the limit via an Enchanted Tome).
Displays a unique visual style to indicate its special overleveled status.
-
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
ConstructorsConstructorDescriptionOverleveled(int x, int y, EnchantRenderState state, int texIndex, boolean usePlainBackground, Runnable onPressAction) Constructs a new EnchantWidget.Overleveled. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmouseClicked(double mouseX, double mouseY, int button) Denies all interaction, as overleveled enchantments cannot be further upgraded directly.protected voidrenderWidget(net.minecraft.client.gui.GuiGraphics context, int mouseX, int mouseY, float partialTick) Renders the distinct overleveled background texture and deep purple 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, as overleveled enchantments cannot be further upgraded directly.- 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 overleveled background texture and deep purple 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.
-