@Environment(value=CLIENT) public class CraftingScreen extends HandledScreen<CraftingScreenHandler> implements RecipeBookProvider
| Modifier and Type | Field and Description |
|---|---|
private boolean |
isNarrow |
private static Identifier |
RECIPE_BUTTON_TEXTURE |
private RecipeBookWidget |
recipeBook |
private static Identifier |
TEXTURE |
BACKGROUND_TEXTURE, backgroundHeight, backgroundWidth, cursorDragSlots, focusedSlot, handler, isCursorDragging, playerInventory, x, ybuttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthGUI_ICONS_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
CraftingScreen(CraftingScreenHandler handler,
PlayerInventory inventory,
Text title) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawBackground(float delta,
int mouseX,
int mouseY) |
protected void |
drawForeground(int mouseX,
int mouseY) |
RecipeBookWidget |
getRecipeBookWidget() |
protected void |
init() |
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) |
protected void |
onMouseClick(Slot slot,
int invSlot,
int clickData,
SlotActionType actionType) |
void |
refreshRecipeBook() |
void |
removed() |
void |
render(int mouseX,
int mouseY,
float delta) |
void |
tick() |
drawMouseoverTooltip, getScreenHandler, handleHotbarKeyPressed, isPauseScreen, keyPressed, mouseDragged, mouseReleased, shouldCloseOnEscaddButton, addChild, children, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderDirtBackground, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, wrapScreenErrorgetFocused, isDragging, setDragging, setFocuseddrawCenteredString, drawHorizontalLine, drawSprite, drawString, drawTexture, drawTexture, drawTexture, drawTexture, drawTexturedQuad, drawVerticalLine, fill, fill, fillGradient, getZOffset, 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 RECIPE_BUTTON_TEXTURE
private final RecipeBookWidget recipeBook
private boolean isNarrow
public CraftingScreen(CraftingScreenHandler handler, PlayerInventory inventory, Text title)
protected void init()
init in class HandledScreen<CraftingScreenHandler>public void tick()
tick in class HandledScreen<CraftingScreenHandler>public void render(int mouseX,
int mouseY,
float delta)
render in interface Drawablerender in class HandledScreen<CraftingScreenHandler>protected void drawForeground(int mouseX,
int mouseY)
drawForeground in class HandledScreen<CraftingScreenHandler>protected void drawBackground(float delta,
int mouseX,
int mouseY)
drawBackground in class HandledScreen<CraftingScreenHandler>protected boolean isPointWithinBounds(int xPosition,
int yPosition,
int width,
int height,
double pointX,
double pointY)
isPointWithinBounds in class HandledScreen<CraftingScreenHandler>public boolean mouseClicked(double mouseX,
double mouseY,
int button)
mouseClicked in interface ElementmouseClicked in interface ParentElementmouseClicked in class HandledScreen<CraftingScreenHandler>protected boolean isClickOutsideBounds(double mouseX,
double mouseY,
int left,
int top,
int button)
isClickOutsideBounds in class HandledScreen<CraftingScreenHandler>protected void onMouseClick(Slot slot, int invSlot, int clickData, SlotActionType actionType)
public void refreshRecipeBook()
refreshRecipeBook in interface RecipeBookProviderpublic void removed()
removed in class HandledScreen<CraftingScreenHandler>public RecipeBookWidget getRecipeBookWidget()
getRecipeBookWidget in interface RecipeBookProvider