@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, y
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_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, removed
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, wrapScreenError
getFocused, isDragging, setDragging, setFocused
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseScrolled, setInitialFocus
mouseMoved
private 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 TickableElement
tick
in class HandledScreen<EnchantmentScreenHandler>
public boolean mouseClicked(double mouseX, double mouseY, int button)
GLFW
class.mouseClicked
in interface Element
mouseClicked
in interface ParentElement
mouseClicked
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_1
protected 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 Drawable
render
in class HandledScreen<EnchantmentScreenHandler>
public void doTick()