@Environment(value=CLIENT) public class EnchantmentScreen extends HandledScreen<EnchantmentScreenHandler>
| Modifier and Type | Field and Description |
|---|---|
float |
approximatePageAngle |
private static BookModel |
BOOK_MODEL |
private static Identifier |
BOOK_TEXTURE |
float |
nextPageAngle |
float |
nextPageTurningSpeed |
float |
pageAngle |
float |
pageRotationSpeed |
float |
pageTurningSpeed |
private Random |
random |
private ItemStack |
stack |
private static Identifier |
TEXTURE |
int |
ticks |
BACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragging, cursorDragSlots, focusedSlot, handler, playerInventory, playerInventoryTitleX, playerInventoryTitleY, titleX, titleY, x, ybuttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthGUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
EnchantmentScreen(EnchantmentScreenHandler handler,
PlayerInventory inventory,
Text title) |
| Modifier and Type | Method and Description |
|---|---|
void |
doTick() |
protected void |
drawBackground(MatrixStack matrices,
float delta,
int mouseX,
int mouseY) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button)
Callback for when a mouse button down event
has been captured.
|
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
void |
tick() |
drawForeground, drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, init, isClickOutsideBounds, isPauseScreen, isPointWithinBounds, keyPressed, mouseDragged, mouseReleased, onClose, onMouseClick, removedaddButton, 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, wrapScreenErrorgetFocused, isDragging, setDragging, setFocuseddrawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseScrolled, setInitialFocusmouseMovedprivate static final Identifier TEXTURE
private static final Identifier BOOK_TEXTURE
private static final BookModel BOOK_MODEL
private final Random random
public int ticks
public float nextPageAngle
public float pageAngle
public float approximatePageAngle
public float pageRotationSpeed
public float nextPageTurningSpeed
public float pageTurningSpeed
private ItemStack stack
public EnchantmentScreen(EnchantmentScreenHandler handler, PlayerInventory inventory, Text title)
public void tick()
tick in interface TickableElementtick in class HandledScreen<EnchantmentScreenHandler>public boolean mouseClicked(double mouseX,
double mouseY,
int button)
GLFW class.mouseClicked in interface ElementmouseClicked in interface ParentElementmouseClicked in class HandledScreen<EnchantmentScreenHandler>mouseX - the X coordinate of the mousemouseY - the Y coordinate of the mousebutton - the mouse button numbertrue to indicate that the event handling is successful/validMouse.onMouseButton(long, int, int, int),
GLFW.GLFW_MOUSE_BUTTON_1protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY)
drawBackground in class HandledScreen<EnchantmentScreenHandler>public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
render in interface Drawablerender in class HandledScreen<EnchantmentScreenHandler>public void doTick()