Class CraftingScreen
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<CraftingScreenHandler>
net.minecraft.client.gui.screen.ingame.CraftingScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,ScreenHandlerProvider<CraftingScreenHandler>,RecipeBookProvider,TickableElement
@Environment(CLIENT) public class CraftingScreen extends HandledScreen<CraftingScreenHandler> implements RecipeBookProvider
-
Field Summary
Fields Modifier and Type Field Description private booleanisNarrowprivate static IdentifierRECIPE_BUTTON_TEXTUREprivate RecipeBookWidgetrecipeBookprivate static IdentifierTEXTUREFields 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 CraftingScreen(CraftingScreenHandler handler, PlayerInventory inventory, Text title) -
Method Summary
Modifier and Type Method Description protected voiddrawBackground(MatrixStack matrices, float delta, 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)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.HandledScreen
drawForeground, drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, isPauseScreen, keyPressed, mouseDragged, mouseReleased, 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
-
TEXTURE
-
RECIPE_BUTTON_TEXTURE
-
recipeBook
-
isNarrow
private boolean isNarrow
-
-
Constructor Details
-
Method Details
-
init
protected void init()- Overrides:
initin classHandledScreen<CraftingScreenHandler>
-
tick
public void tick()- Specified by:
tickin interfaceTickableElement- Overrides:
tickin classHandledScreen<CraftingScreenHandler>
-
render
- Specified by:
renderin interfaceDrawable- Overrides:
renderin classHandledScreen<CraftingScreenHandler>
-
drawBackground
- Specified by:
drawBackgroundin classHandledScreen<CraftingScreenHandler>
-
isPointWithinBounds
protected boolean isPointWithinBounds(int xPosition, int yPosition, int width, int height, double pointX, double pointY)- Overrides:
isPointWithinBoundsin classHandledScreen<CraftingScreenHandler>
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button)- Specified by:
mouseClickedin interfaceElement- Specified by:
mouseClickedin interfaceParentElement- Overrides:
mouseClickedin classHandledScreen<CraftingScreenHandler>
-
isClickOutsideBounds
protected boolean isClickOutsideBounds(double mouseX, double mouseY, int left, int top, int button)- Overrides:
isClickOutsideBoundsin classHandledScreen<CraftingScreenHandler>
-
onMouseClick
-
refreshRecipeBook
public void refreshRecipeBook()- Specified by:
refreshRecipeBookin interfaceRecipeBookProvider
-
removed
public void removed()- Overrides:
removedin classHandledScreen<CraftingScreenHandler>
-
getRecipeBookWidget
- Specified by:
getRecipeBookWidgetin interfaceRecipeBookProvider
-