Class RecipeBookComponent
java.lang.Object
net.minecraft.client.gui.screens.recipebook.RecipeBookComponent
- All Implemented Interfaces:
- GuiEventListener,- Renderable,- TabOrderedElement,- NarratableEntry,- NarrationSupplier,- RecipeShownListener,- PlaceRecipe<Ingredient>
- Direct Known Subclasses:
- AbstractFurnaceRecipeBookComponent
public class RecipeBookComponent
extends Object
implements PlaceRecipe<Ingredient>, Renderable, GuiEventListener, NarratableEntry, RecipeShownListener
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntryNarratableEntry.NarrationPriority
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final Componentprivate ClientRecipeBookprivate static final WidgetSpritesprotected StateSwitchingButtonprotected final GhostRecipeprivate intprivate booleanstatic final intstatic final intprivate Stringprotected RecipeBookMenu<?>protected Minecraftprivate static final intprivate static final Componentprotected static final ResourceLocationstatic final WidgetSpritesprivate final RecipeBookPageprivate static final Componentprivate EditBoxprivate RecipeBookTabButtonprivate final StackedContentsprivate final List<RecipeBookTabButton>private intprivate booleanprivate intprivate booleanprivate intFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListenerDOUBLE_CLICK_THRESHOLD_MS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddItemToSlot(Iterator<Ingredient> p_100338_, int p_100339_, int p_100340_, int p_100341_, int p_100342_) booleancharTyped(char p_100291_, int p_100292_) private voidprotected ComponentbooleanhasClickedOutside(double p_100298_, double p_100299_, int p_100300_, int p_100301_, int p_100302_, int p_100303_, int p_100304_) voidinit(int p_100310_, int p_100311_, Minecraft p_100312_, boolean p_100313_, RecipeBookMenu<?> p_100314_) protected voidvoidbooleanbooleanisMouseOver(double p_100353_, double p_100354_) private booleanbooleanprivate booleanbooleankeyPressed(int p_100306_, int p_100307_, int p_100308_) booleankeyReleased(int p_100356_, int p_100357_, int p_100358_) booleanmouseClicked(double p_100294_, double p_100295_, int p_100296_) private voidpirateSpeechForThePeople(String p_100336_) voidrecipesShown(List<RecipeHolder<?>> p_100344_) voidvoidrender(GuiGraphics p_283597_, int p_282668_, int p_283506_, float p_282813_) voidrenderGhostRecipe(GuiGraphics p_283634_, int p_283327_, int p_282027_, boolean p_283495_, float p_283514_) private voidrenderGhostRecipeTooltip(GuiGraphics p_282776_, int p_282886_, int p_281571_, int p_282948_, int p_283050_) voidrenderTooltip(GuiGraphics p_281740_, int p_281520_, int p_282050_, int p_282836_, int p_282758_) protected voidvoidsetFocused(boolean p_265089_) voidsetupGhostRecipe(RecipeHolder<?> p_301197_, List<Slot> p_100317_) protected voidsetVisible(boolean p_100370_) voidslotClicked(Slot p_100315_) voidtick()private booleanvoidprivate voidupdateCollections(boolean p_100383_) private voidvoidupdateNarration(NarrationElementOutput p_170046_) intupdateScreenPosition(int p_181402_, int p_181403_) private voidprivate voidMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListenergetCurrentFocusPath, getRectangle, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPathMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntryisActiveMethods inherited from interface net.minecraft.recipebook.PlaceRecipeplaceRecipeMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElementgetTabOrderGroup
- 
Field Details- 
RECIPE_BUTTON_SPRITES
- 
FILTER_BUTTON_SPRITES
- 
RECIPE_BOOK_LOCATION
- 
SEARCH_HINT
- 
IMAGE_WIDTHpublic static final int IMAGE_WIDTH- See Also:
 
- 
IMAGE_HEIGHTpublic static final int IMAGE_HEIGHT- See Also:
 
- 
OFFSET_X_POSITIONprivate static final int OFFSET_X_POSITION- See Also:
 
- 
ONLY_CRAFTABLES_TOOLTIP
- 
ALL_RECIPES_TOOLTIP
- 
xOffsetprivate int xOffset
- 
widthprivate int width
- 
heightprivate int height
- 
ghostRecipe
- 
tabButtons
- 
selectedTab
- 
filterButton
- 
minecraft
- 
searchBox
- 
lastSearch
- 
book
- 
recipeBookPage
- 
stackedContents
- 
timesInventoryChangedprivate int timesInventoryChanged
- 
ignoreTextInputprivate boolean ignoreTextInput
- 
visibleprivate boolean visible
- 
widthTooNarrowprivate boolean widthTooNarrow
 
- 
- 
Constructor Details- 
RecipeBookComponentpublic RecipeBookComponent()
 
- 
- 
Method Details- 
initpublic void init(int p_100310_, int p_100311_, Minecraft p_100312_, boolean p_100313_, RecipeBookMenu<?> p_100314_) 
- 
initVisualspublic void initVisuals()
- 
updateFilterButtonTooltipprivate void updateFilterButtonTooltip()
- 
initFilterButtonTexturesprotected void initFilterButtonTextures()
- 
updateScreenPositionpublic int updateScreenPosition(int p_181402_, int p_181403_) 
- 
toggleVisibilitypublic void toggleVisibility()
- 
isVisiblepublic boolean isVisible()
- 
isVisibleAccordingToBookDataprivate boolean isVisibleAccordingToBookData()
- 
setVisibleprotected void setVisible(boolean p_100370_) 
- 
slotClicked
- 
updateCollectionsprivate void updateCollections(boolean p_100383_) 
- 
updateTabsprivate void updateTabs()
- 
tickpublic void tick()
- 
updateStackedContentsprivate void updateStackedContents()
- 
render- Specified by:
- renderin interface- Renderable
 
- 
renderTooltippublic void renderTooltip(GuiGraphics p_281740_, int p_281520_, int p_282050_, int p_282836_, int p_282758_) 
- 
getRecipeFilterName
- 
renderGhostRecipeTooltipprivate void renderGhostRecipeTooltip(GuiGraphics p_282776_, int p_282886_, int p_281571_, int p_282948_, int p_283050_) 
- 
renderGhostRecipepublic void renderGhostRecipe(GuiGraphics p_283634_, int p_283327_, int p_282027_, boolean p_283495_, float p_283514_) 
- 
mouseClickedpublic boolean mouseClicked(double p_100294_, double p_100295_, int p_100296_) - Specified by:
- mouseClickedin interface- GuiEventListener
 
- 
toggleFilteringprivate boolean toggleFiltering()
- 
hasClickedOutsidepublic boolean hasClickedOutside(double p_100298_, double p_100299_, int p_100300_, int p_100301_, int p_100302_, int p_100303_, int p_100304_) 
- 
keyPressedpublic boolean keyPressed(int p_100306_, int p_100307_, int p_100308_) - Specified by:
- keyPressedin interface- GuiEventListener
 
- 
keyReleasedpublic boolean keyReleased(int p_100356_, int p_100357_, int p_100358_) - Specified by:
- keyReleasedin interface- GuiEventListener
 
- 
charTypedpublic boolean charTyped(char p_100291_, int p_100292_) - Specified by:
- charTypedin interface- GuiEventListener
 
- 
isMouseOverpublic boolean isMouseOver(double p_100353_, double p_100354_) - Specified by:
- isMouseOverin interface- GuiEventListener
 
- 
setFocusedpublic void setFocused(boolean p_265089_) - Specified by:
- setFocusedin interface- GuiEventListener
 
- 
isFocusedpublic boolean isFocused()- Specified by:
- isFocusedin interface- GuiEventListener
 
- 
checkSearchStringUpdateprivate void checkSearchStringUpdate()
- 
pirateSpeechForThePeople
- 
isOffsetNextToMainGUIprivate boolean isOffsetNextToMainGUI()
- 
recipesUpdatedpublic void recipesUpdated()
- 
recipesShown- Specified by:
- recipesShownin interface- RecipeShownListener
 
- 
setupGhostRecipe
- 
addItemToSlotpublic void addItemToSlot(Iterator<Ingredient> p_100338_, int p_100339_, int p_100340_, int p_100341_, int p_100342_) - Specified by:
- addItemToSlotin interface- PlaceRecipe<Ingredient>
 
- 
sendUpdateSettingsprotected void sendUpdateSettings()
- 
narrationPriority- Specified by:
- narrationPriorityin interface- NarratableEntry
 
- 
updateNarration- Specified by:
- updateNarrationin interface- NarrationSupplier
 
 
-