Class AbstractRecipeBookScreen<T extends RecipeBookMenu>
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T>
net.minecraft.client.gui.screens.inventory.AbstractRecipeBookScreen<T>
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
,TabOrderedElement
,MenuAccess<T>
,RecipeUpdateListener
- Direct Known Subclasses:
AbstractFurnaceScreen
,CraftingScreen
,InventoryScreen
public abstract class AbstractRecipeBookScreen<T extends RecipeBookMenu>
extends AbstractContainerScreen<T>
implements RecipeUpdateListener
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
FieldsFields inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
BACKGROUND_TEXTURE_HEIGHT, BACKGROUND_TEXTURE_WIDTH, hoveredSlot, imageHeight, imageWidth, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, playerInventoryTitle, quickCraftSlots, SLOT_ITEM_BLIT_OFFSET, slotColor, titleLabelX, titleLabelY, topPos
Fields inherited from class net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractRecipeBookScreen
(T pMenu, RecipeBookComponent<?> pRecipeBookComponent, Inventory pPlayerInventory, Component pTitle) -
Method Summary
Modifier and TypeMethodDescriptionboolean
charTyped
(char p_376170_, int p_376511_) Called when a character is typed within the GUI element.void
void
fillGhostRecipe
(RecipeDisplay p_379988_) protected abstract ScreenPosition
protected boolean
hasClickedOutside
(double p_376729_, double p_376497_, int p_376612_, int p_376679_, int p_376937_) protected void
init()
private void
protected boolean
protected boolean
isHovering
(int p_376913_, int p_376169_, int p_376269_, int p_376237_, double p_376730_, double p_376230_) boolean
keyPressed
(int p_376379_, int p_376138_, int p_376148_) Called when a keyboard key is pressed within the GUI element.boolean
mouseClicked
(double p_376773_, double p_376144_, int p_376496_) Called when a mouse button is clicked within the GUI element.protected void
void
void
render
(GuiGraphics p_376146_, int p_376361_, int p_376653_, float p_376448_) Neo: mixins targeting this method won't fire for container screens asAbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float)
replicates this method in place of a super call to insert an eventprotected void
renderSlots
(GuiGraphics p_376566_) protected void
slotClicked
(Slot p_376636_, int p_376122_, int p_376346_, ClickType p_376809_) Called when the mouse is clicked over a slot or outside the gui.Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
addItemSlotMouseAction, checkHotbarKeyPressed, clearDraggingState, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getTooltipFromContainerItem, getXSize, getYSize, handleSlotStateChanged, isPauseScreen, mouseDragged, mouseReleased, mouseScrolled, onClose, onMouseClickAction, removed, renderBackground, renderBg, renderLabels, renderSlot, renderSlotContents, renderTooltip, tick
Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMoved
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
recipeBookComponent
-
widthTooNarrow
private boolean widthTooNarrow
-
-
Constructor Details
-
AbstractRecipeBookScreen
public AbstractRecipeBookScreen(T pMenu, RecipeBookComponent<?> pRecipeBookComponent, Inventory pPlayerInventory, Component pTitle)
-
-
Method Details
-
init
protected void init()- Overrides:
init
in classAbstractContainerScreen<T extends RecipeBookMenu>
-
getRecipeBookButtonPosition
-
initButton
private void initButton() -
onRecipeBookButtonClick
protected void onRecipeBookButtonClick() -
render
Description copied from class:Screen
Neo: mixins targeting this method won't fire for container screens asAbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float)
replicates this method in place of a super call to insert an event- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classAbstractContainerScreen<T extends RecipeBookMenu>
- Parameters:
p_376146_
- the GuiGraphics object used for rendering.p_376361_
- the x-coordinate of the mouse cursor.p_376653_
- the y-coordinate of the mouse cursor.p_376448_
- the partial tick time.
-
renderSlots
- Overrides:
renderSlots
in classAbstractContainerScreen<T extends RecipeBookMenu>
-
isBiggerResultSlot
protected boolean isBiggerResultSlot() -
charTyped
public boolean charTyped(char p_376170_, int p_376511_) Description copied from interface:ContainerEventHandler
Called when a character is typed within the GUI element.- Specified by:
charTyped
in interfaceContainerEventHandler
- Specified by:
charTyped
in interfaceGuiEventListener
- Parameters:
p_376170_
- the code point of the typed character.p_376511_
- the keyboard modifiers.- Returns:
true
if the event is consumed,false
otherwise.
-
keyPressed
public boolean keyPressed(int p_376379_, int p_376138_, int p_376148_) Description copied from interface:ContainerEventHandler
Called when a keyboard key is pressed within the GUI element.- Specified by:
keyPressed
in interfaceContainerEventHandler
- Specified by:
keyPressed
in interfaceGuiEventListener
- Overrides:
keyPressed
in classAbstractContainerScreen<T extends RecipeBookMenu>
- Parameters:
p_376379_
- the key code of the pressed key.p_376138_
- the scan code of the pressed key.p_376148_
- the keyboard modifiers.- Returns:
true
if the event is consumed,false
otherwise.
-
mouseClicked
public boolean mouseClicked(double p_376773_, double p_376144_, int p_376496_) Description copied from interface:ContainerEventHandler
Called when a mouse button is clicked within the GUI element.- Specified by:
mouseClicked
in interfaceContainerEventHandler
- Specified by:
mouseClicked
in interfaceGuiEventListener
- Overrides:
mouseClicked
in classAbstractContainerScreen<T extends RecipeBookMenu>
- Parameters:
p_376773_
- the X coordinate of the mouse.p_376144_
- the Y coordinate of the mouse.p_376496_
- the button that was clicked.- Returns:
true
if the event is consumed,false
otherwise.
-
isHovering
protected boolean isHovering(int p_376913_, int p_376169_, int p_376269_, int p_376237_, double p_376730_, double p_376230_) - Overrides:
isHovering
in classAbstractContainerScreen<T extends RecipeBookMenu>
-
hasClickedOutside
protected boolean hasClickedOutside(double p_376729_, double p_376497_, int p_376612_, int p_376679_, int p_376937_) - Overrides:
hasClickedOutside
in classAbstractContainerScreen<T extends RecipeBookMenu>
-
slotClicked
Description copied from class:AbstractContainerScreen
Called when the mouse is clicked over a slot or outside the gui.- Overrides:
slotClicked
in classAbstractContainerScreen<T extends RecipeBookMenu>
-
containerTick
public void containerTick()- Overrides:
containerTick
in classAbstractContainerScreen<T extends RecipeBookMenu>
-
recipesUpdated
public void recipesUpdated()- Specified by:
recipesUpdated
in interfaceRecipeUpdateListener
-
fillGhostRecipe
- Specified by:
fillGhostRecipe
in interfaceRecipeUpdateListener
-