@Environment(value=CLIENT) public class InventoryScreen extends AbstractInventoryScreen<PlayerScreenHandler> implements RecipeBookProvider
| Modifier and Type | Field and Description |
|---|---|
private boolean |
mouseDown |
private float |
mouseX |
private float |
mouseY |
private boolean |
narrow |
private boolean |
open |
private static Identifier |
RECIPE_BUTTON_TEXTURE |
private RecipeBookWidget |
recipeBook |
drawStatusEffectsBACKGROUND_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 |
|---|
InventoryScreen(PlayerEntity player) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawBackground(MatrixStack matrices,
float delta,
int mouseX,
int mouseY) |
static void |
drawEntity(int x,
int y,
int size,
float mouseX,
float mouseY,
LivingEntity entity) |
protected void |
drawForeground(MatrixStack matrices,
int mouseX,
int mouseY) |
RecipeBookWidget |
getRecipeBookWidget() |
protected void |
init()
Called when a screen should be initialized.
|
protected boolean |
isClickOutsideBounds(double mouseX,
double mouseY,
int left,
int top,
int button) |
protected boolean |
isPointWithinBounds(int xPosition,
int yPosition,
int width,
int height,
double pointX,
double pointY) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button)
Callback for when a mouse button down event
has been captured.
|
boolean |
mouseReleased(double mouseX,
double mouseY,
int button)
Callback for when a mouse button release event
has been captured.
|
protected void |
onMouseClick(Slot slot,
int invSlot,
int clickData,
SlotActionType actionType) |
void |
refreshRecipeBook() |
void |
removed() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
void |
tick() |
applyStatusEffectOffsetdrawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, isPauseScreen, keyPressed, mouseDragged, onCloseaddButton, 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 RECIPE_BUTTON_TEXTURE
private float mouseX
private float mouseY
private final RecipeBookWidget recipeBook
private boolean open
private boolean narrow
private boolean mouseDown
public InventoryScreen(PlayerEntity player)
public void tick()
tick in interface TickableElementtick in class HandledScreen<PlayerScreenHandler>protected void init()
This method is called when this screen is opened or resized.
init in class AbstractInventoryScreen<PlayerScreenHandler>protected void drawForeground(MatrixStack matrices, int mouseX, int mouseY)
drawForeground in class HandledScreen<PlayerScreenHandler>public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
render in interface Drawablerender in class AbstractInventoryScreen<PlayerScreenHandler>protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY)
drawBackground in class HandledScreen<PlayerScreenHandler>public static void drawEntity(int x,
int y,
int size,
float mouseX,
float mouseY,
LivingEntity entity)
protected boolean isPointWithinBounds(int xPosition,
int yPosition,
int width,
int height,
double pointX,
double pointY)
isPointWithinBounds in class HandledScreen<PlayerScreenHandler>public boolean mouseClicked(double mouseX,
double mouseY,
int button)
GLFW class.mouseClicked in interface ElementmouseClicked in interface ParentElementmouseClicked in class HandledScreen<PlayerScreenHandler>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_1public boolean mouseReleased(double mouseX,
double mouseY,
int button)
GLFW class.mouseReleased in interface ElementmouseReleased in interface ParentElementmouseReleased in class HandledScreen<PlayerScreenHandler>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 boolean isClickOutsideBounds(double mouseX,
double mouseY,
int left,
int top,
int button)
isClickOutsideBounds in class HandledScreen<PlayerScreenHandler>protected void onMouseClick(Slot slot, int invSlot, int clickData, SlotActionType actionType)
public void refreshRecipeBook()
refreshRecipeBook in interface RecipeBookProviderpublic void removed()
removed in class HandledScreen<PlayerScreenHandler>public RecipeBookWidget getRecipeBookWidget()
getRecipeBookWidget in interface RecipeBookProvider