Class EnchantmentScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<EnchantmentMenu>
net.minecraft.client.gui.screens.inventory.EnchantmentScreen
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
,TabOrderedElement
,MenuAccess<EnchantmentMenu>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
AbstractContainerScreen.SnapbackData
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BookModel
private static final ResourceLocation[]
private static final ResourceLocation[]
private static final ResourceLocation
The ResourceLocation containing the texture for the Book rendered above the enchantment tableprivate static final ResourceLocation
The ResourceLocation containing the Enchantment GUI texture locationprivate static final ResourceLocation
private static final ResourceLocation
private static final ResourceLocation
float
float
float
private ItemStack
float
float
float
private final RandomSource
A Random instance for use with the enchantment guiFields inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
BACKGROUND_TEXTURE_HEIGHT, BACKGROUND_TEXTURE_WIDTH, hoveredSlot, imageHeight, imageWidth, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, playerInventoryTitle, quickCraftSlots, slotColor, titleLabelX, titleLabelY, topPos
Fields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorsConstructorDescriptionEnchantmentScreen
(EnchantmentMenu pMenu, Inventory pPlayerInventory, Component pTitle) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
init()
boolean
mouseClicked
(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.void
render
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) Renders the graphical user interface (GUI) element.protected void
renderBg
(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) private void
renderBook
(GuiGraphics pGuiGraphics, int pX, int pY) void
tickBook()
Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
addItemSlotMouseAction, checkHotbarKeyPressed, clearDraggingState, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getTooltipFromContainerItem, getXSize, getYSize, handleSlotStateChanged, hasClickedOutside, isHovering, isPauseScreen, keyPressed, mouseDragged, mouseReleased, mouseScrolled, onClose, onMouseClickAction, removed, renderBackground, renderCarriedItem, renderContents, renderLabels, renderSlot, renderSlotContents, renderSlots, renderSnapbackItem, renderTooltip, slotClicked, tick
Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleClickEvent, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
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, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMoved
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
ENABLED_LEVEL_SPRITES
-
DISABLED_LEVEL_SPRITES
-
ENCHANTMENT_SLOT_DISABLED_SPRITE
-
ENCHANTMENT_SLOT_HIGHLIGHTED_SPRITE
-
ENCHANTMENT_SLOT_SPRITE
-
ENCHANTING_TABLE_LOCATION
The ResourceLocation containing the Enchantment GUI texture location -
ENCHANTING_BOOK_LOCATION
The ResourceLocation containing the texture for the Book rendered above the enchantment table -
random
A Random instance for use with the enchantment gui -
bookModel
-
flip
public float flip -
oFlip
public float oFlip -
flipT
public float flipT -
flipA
public float flipA -
open
public float open -
oOpen
public float oOpen -
last
-
-
Constructor Details
-
EnchantmentScreen
-
-
Method Details
-
init
protected void init()- Overrides:
init
in classAbstractContainerScreen<EnchantmentMenu>
-
containerTick
public void containerTick()- Overrides:
containerTick
in classAbstractContainerScreen<EnchantmentMenu>
-
mouseClicked
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.- Specified by:
mouseClicked
in interfaceContainerEventHandler
- Specified by:
mouseClicked
in interfaceGuiEventListener
- Overrides:
mouseClicked
in classAbstractContainerScreen<EnchantmentMenu>
- Parameters:
pMouseX
- the X coordinate of the mouse.pMouseY
- the Y coordinate of the mouse.pButton
- the button that was clicked.- Returns:
true
if the event is consumed,false
otherwise.
-
renderBg
- Specified by:
renderBg
in classAbstractContainerScreen<EnchantmentMenu>
-
renderBook
-
render
Renders the graphical user interface (GUI) element.- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classAbstractContainerScreen<EnchantmentMenu>
- Parameters:
pGuiGraphics
- the GuiGraphics object used for rendering.pMouseX
- the x-coordinate of the mouse cursor.pMouseY
- the y-coordinate of the mouse cursor.pPartialTick
- the partial tick time.
-
tickBook
public void tickBook()
-