Class EnchantmentScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.ingame.HandledScreen<EnchantmentScreenHandler>
net.minecraft.client.gui.screen.ingame.EnchantmentScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,ScreenHandlerProvider<EnchantmentScreenHandler>,TickableElement
@Environment(CLIENT) public class EnchantmentScreen extends HandledScreen<EnchantmentScreenHandler>
-
Field Summary
Fields Modifier and Type Field Description floatapproximatePageAngleprivate static BookModelBOOK_MODELprivate static IdentifierBOOK_TEXTUREfloatnextPageAnglefloatnextPageTurningSpeedfloatpageAnglefloatpageRotationSpeedfloatpageTurningSpeedprivate Randomrandomprivate ItemStackstackprivate static IdentifierTEXTUREintticksFields inherited from class net.minecraft.client.gui.screen.ingame.HandledScreen
BACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragging, cursorDragSlots, focusedSlot, handler, playerInventory, playerInventoryTitleX, playerInventoryTitleY, titleX, titleY, x, yFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description EnchantmentScreen(EnchantmentScreenHandler handler, PlayerInventory inventory, Text title) -
Method Summary
Modifier and Type Method Description voiddoTick()protected voiddrawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY)booleanmouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured.voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)voidtick()Methods inherited from class net.minecraft.client.gui.screen.ingame.HandledScreen
drawForeground, drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, init, isClickOutsideBounds, isPauseScreen, isPointWithinBounds, keyPressed, mouseDragged, mouseReleased, onClose, onMouseClick, removedMethods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseScrolled, setInitialFocus
-
Field Details
-
TEXTURE
-
BOOK_TEXTURE
-
BOOK_MODEL
-
random
-
ticks
public int ticks -
nextPageAngle
public float nextPageAngle -
pageAngle
public float pageAngle -
approximatePageAngle
public float approximatePageAngle -
pageRotationSpeed
public float pageRotationSpeed -
nextPageTurningSpeed
public float nextPageTurningSpeed -
pageTurningSpeed
public float pageTurningSpeed -
stack
-
-
Constructor Details
-
EnchantmentScreen
-
-
Method Details
-
tick
public void tick()- Specified by:
tickin interfaceTickableElement- Overrides:
tickin classHandledScreen<EnchantmentScreenHandler>
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured. The button number is identified by the constants inGLFWclass.- Specified by:
mouseClickedin interfaceElement- Specified by:
mouseClickedin interfaceParentElement- Overrides:
mouseClickedin classHandledScreen<EnchantmentScreenHandler>- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto indicate that the event handling is successful/valid- See Also:
Mouse.onMouseButton(long, int, int, int),GLFW.GLFW_MOUSE_BUTTON_1
-
drawBackground
- Specified by:
drawBackgroundin classHandledScreen<EnchantmentScreenHandler>
-
render
- Specified by:
renderin interfaceDrawable- Overrides:
renderin classHandledScreen<EnchantmentScreenHandler>
-
doTick
public void doTick()
-