@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, y
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, width
GUI_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, shouldCloseOnEsc
addButton, 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, wrapScreenError
getFocused, isDragging, setDragging, setFocused
drawCenteredString, drawHorizontalLine, drawSprite, drawString, drawTexture, drawTexture, drawTexture, drawTexture, drawTexturedQuad, drawVerticalLine, fill, fill, fillGradient, getZOffset, 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 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 Drawable
render
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 Element
mouseClicked
in interface ParentElement
mouseClicked
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 RecipeBookProvider
public void removed()
removed
in class HandledScreen<CraftingScreenHandler>
public RecipeBookWidget getRecipeBookWidget()
getRecipeBookWidget
in interface RecipeBookProvider