Class InventoryScreen
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<T>
net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen<PlayerScreenHandler>
net.minecraft.client.gui.screen.ingame.InventoryScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,ScreenHandlerProvider<PlayerScreenHandler>,RecipeBookProvider,TickableElement
@Environment(CLIENT) public class InventoryScreen extends AbstractInventoryScreen<PlayerScreenHandler> implements RecipeBookProvider
-
Field Summary
Fields Modifier and Type Field Description private booleanisMouseDownprivate booleanisNarrowprivate booleanisOpenprivate floatmouseXprivate floatmouseYprivate static IdentifierRECIPE_BUTTON_TEXTUREprivate RecipeBookWidgetrecipeBookFields inherited from class net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen
drawStatusEffectsFields inherited from class net.minecraft.client.gui.screen.ingame.HandledScreen
BACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragSlots, focusedSlot, handler, isCursorDragging, 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, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description InventoryScreen(PlayerEntity player) -
Method Summary
Modifier and Type Method Description protected voiddrawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY)static voiddrawEntity(int x, int y, int size, float mouseX, float mouseY, LivingEntity entity)protected voiddrawForeground(MatrixStack matrices, int mouseX, int mouseY)RecipeBookWidgetgetRecipeBookWidget()protected voidinit()protected booleanisClickOutsideBounds(double mouseX, double mouseY, int left, int top, int button)protected booleanisPointWithinBounds(int xPosition, int yPosition, int width, int height, double pointX, double pointY)booleanmouseClicked(double mouseX, double mouseY, int button)booleanmouseReleased(double mouseX, double mouseY, int button)protected voidonMouseClick(Slot slot, int invSlot, int clickData, SlotActionType actionType)voidrefreshRecipeBook()voidremoved()voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)voidtick()Methods inherited from class net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen
applyStatusEffectOffsetMethods inherited from class net.minecraft.client.gui.screen.ingame.HandledScreen
drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, isPauseScreen, keyPressed, mouseDragged, shouldCloseOnEscMethods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, method_29638, onClose, renderBackground, renderBackground, renderBackgroundTexture, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, 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.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseScrolled, setInitialFocus
-
Field Details
-
RECIPE_BUTTON_TEXTURE
-
mouseX
private float mouseX -
mouseY
private float mouseY -
recipeBook
-
isOpen
private boolean isOpen -
isNarrow
private boolean isNarrow -
isMouseDown
private boolean isMouseDown
-
-
Constructor Details
-
Method Details
-
tick
public void tick()- Specified by:
tickin interfaceTickableElement- Overrides:
tickin classHandledScreen<PlayerScreenHandler>
-
init
protected void init()- Overrides:
initin classAbstractInventoryScreen<PlayerScreenHandler>
-
drawForeground
- Overrides:
drawForegroundin classHandledScreen<PlayerScreenHandler>
-
render
- Specified by:
renderin interfaceDrawable- Overrides:
renderin classAbstractInventoryScreen<PlayerScreenHandler>
-
drawBackground
- Specified by:
drawBackgroundin classHandledScreen<PlayerScreenHandler>
-
drawEntity
public static void drawEntity(int x, int y, int size, float mouseX, float mouseY, LivingEntity entity) -
isPointWithinBounds
protected boolean isPointWithinBounds(int xPosition, int yPosition, int width, int height, double pointX, double pointY)- Overrides:
isPointWithinBoundsin classHandledScreen<PlayerScreenHandler>
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button)- Specified by:
mouseClickedin interfaceElement- Specified by:
mouseClickedin interfaceParentElement- Overrides:
mouseClickedin classHandledScreen<PlayerScreenHandler>
-
mouseReleased
public boolean mouseReleased(double mouseX, double mouseY, int button)- Specified by:
mouseReleasedin interfaceElement- Specified by:
mouseReleasedin interfaceParentElement- Overrides:
mouseReleasedin classHandledScreen<PlayerScreenHandler>
-
isClickOutsideBounds
protected boolean isClickOutsideBounds(double mouseX, double mouseY, int left, int top, int button)- Overrides:
isClickOutsideBoundsin classHandledScreen<PlayerScreenHandler>
-
onMouseClick
-
refreshRecipeBook
public void refreshRecipeBook()- Specified by:
refreshRecipeBookin interfaceRecipeBookProvider
-
removed
public void removed()- Overrides:
removedin classHandledScreen<PlayerScreenHandler>
-
getRecipeBookWidget
- Specified by:
getRecipeBookWidgetin interfaceRecipeBookProvider
-