net.minecraft.client.gui.screen.recipebook

public abstract class RecipeBookWidget<T extends AbstractRecipeScreenHandler>

implements Element, Drawable, Selectable

net.minecraft.client.gui.screens.recipebook.RecipeBookComponent
net.minecraft.client.gui.screens.recipebook.RecipeBookComponent
net.minecraft.class_507
net.minecraft.client.gui.screen.recipebook.RecipeBookWidget

Field summary

Modifier and TypeField
public static final ButtonTextures
RECIPE_BUTTON_SPRITES
RECIPE_BUTTON_SPRITES
field_45550
BUTTON_TEXTURES
protected static final Identifier
RECIPE_BOOK_LOCATION
RECIPE_BOOK_LOCATION
field_3097
TEXTURE
private static final int
BACKGROUND_TEXTURE_WIDTH
BACKGROUND_TEXTURE_WIDTH
field_52839
field_52839
private static final int
BACKGROUND_TEXTURE_HEIGHT
BACKGROUND_TEXTURE_HEIGHT
field_52840
field_52840
private static final Text
SEARCH_HINT
SEARCH_HINT
field_25711
SEARCH_HINT_TEXT
public static final int
IMAGE_WIDTH
IMAGE_WIDTH
field_32408
field_32408
public static final int
IMAGE_HEIGHT
IMAGE_HEIGHT
field_32409
field_32409
private static final int
OFFSET_X_POSITION
OFFSET_X_POSITION
field_32410
field_32410
private static final int
BORDER_WIDTH
BORDER_WIDTH
field_54389
field_54389
private static final Text
ALL_RECIPES_TOOLTIP
ALL_RECIPES_TOOLTIP
field_26594
TOGGLE_ALL_RECIPES_TEXT
private static final int
TICKS_TO_SWAP_SLOT
TICKS_TO_SWAP_SLOT
field_52841
field_52841
private int
xOffset
xOffset
field_3102
leftOffset
private int
width
width
field_3101
parentWidth
private int
height
height
field_3100
parentHeight
private float
time
time
field_52842
displayTime
private NetworkRecipeId
lastPlacedRecipe
lastPlacedRecipe
field_54830
selectedRecipeId
private final GhostRecipe
ghostSlots
ghostSlots
field_52843
ghostRecipe
private final List<RecipeGroupButtonWidget>
tabButtons
tabButtons
field_3094
tabButtons
private RecipeGroupButtonWidget
selectedTab
selectedTab
field_3098
currentTab
protected CyclingButtonWidget<Boolean>
filterButton
filterButton
field_3088
toggleCraftableButton
protected final T
menu
menu
field_3095
craftingScreenHandler
protected MinecraftClient
minecraft
minecraft
field_3091
client
private TextFieldWidget
searchBox
searchBox
field_3089
searchField
private String
lastSearch
lastSearch
field_3099
searchText
private final List<RecipeBookWidget$Tab>
tabInfos
tabInfos
field_54831
tabs
private ClientRecipeBook
book
book
field_3096
recipeBook
private final RecipeBookResults
recipeBookPage
recipeBookPage
field_3086
recipesArea
private NetworkRecipeId
lastRecipe
lastRecipe
field_53832
selectedRecipe
private RecipeResultCollection
lastRecipeCollection
lastRecipeCollection
field_53833
selectedRecipeResults
private final RecipeFinder
stackedContents
stackedContents
field_3090
recipeFinder
private int
timesInventoryChanged
timesInventoryChanged
field_3093
cachedInvChangeCount
private boolean
ignoreTextInput
ignoreTextInput
field_3087
searching
private boolean
visible
visible
field_33679
open
private boolean
widthTooNarrow
widthTooNarrow
field_34001
narrow
private ScreenRect
magnifierIconPlacement
magnifierIconPlacement
field_54388
searchFieldRect

Constructor summary

ModifierConstructor
public (T craftingScreenHandler, List<RecipeBookWidget$Tab> tabs)

Method summary

Modifier and TypeMethod
public void
init(int width, int height, Minecraft minecraft, boolean widthTooNarrow)
init(int width, int height, Minecraft minecraft, boolean widthTooNarrow)
method_2597(int arg0, int arg1, class_310 arg2, boolean arg3)
initialize(int parentWidth, int parentHeight, MinecraftClient client, boolean narrow)
private void
initVisuals()
initVisuals()
method_2579()
reset()
private int
getYOrigin()
getYOrigin()
method_64366()
getTop()
private int
getXOrigin()
getXOrigin()
method_64367()
getLeft()
protected abstract ButtonTextures
getFilterButtonTextures()
getFilterButtonTextures()
method_76629()
getBookButtonTextures()
public int
updateScreenPosition(int width, int imageWidth)
updateScreenPosition(int width, int imageWidth)
method_2595(int arg0, int arg1)
findLeftEdge(int width, int backgroundWidth)
public void
toggleVisibility()
toggleVisibility()
method_2591()
toggleOpen()
public boolean
isVisible()
isVisible()
method_2605()
isOpen()
private boolean
isVisibleAccordingToBookData()
isVisibleAccordingToBookData()
method_36485()
isGuiOpen()
protected void
setVisible(boolean visible)
setVisible(boolean visible)
method_2593(boolean arg0)
setOpen(boolean opened)
protected abstract boolean
isCraftingSlot(Slot slot)
isCraftingSlot(Slot slot)
method_62023(class_1735 arg0)
isCraftingSlot(Slot slot)
public void
slotClicked(Slot slot)
slotClicked(Slot slot)
method_62044(class_1735 arg0)
onMouseClick(Slot slot)
private void
selectMatchingRecipes()
selectMatchingRecipes()
method_65072()
populateAllRecipes()
protected abstract void
selectMatchingRecipes(RecipeCollection collection, StackedItemContents stackedContents)
selectMatchingRecipes(RecipeCollection collection, StackedItemContents stackedContents)
method_62024(class_516 arg0, class_9875 arg1)
populateRecipes(RecipeResultCollection recipeResultCollection, RecipeFinder recipeFinder)
private void
updateCollections(boolean resetPage, boolean isFiltering)
updateCollections(boolean resetPage, boolean isFiltering)
method_2603(boolean arg0, boolean arg1)
refreshResults(boolean resetCurrentPage, boolean filteringCraftable)
private void
updateTabs(boolean isFiltering)
updateTabs(boolean isFiltering)
method_2606(boolean arg0)
refreshTabButtons(boolean filteringCraftable)
public void
tick()
tick()
method_2590()
update()
private void
updateStackedContents()
updateStackedContents()
method_2587()
refreshInputs()
private boolean
isFiltering()
isFiltering()
method_62045()
isFilteringCraftable()
public void
extractRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
extractRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
method_25394(class_332 arg0, int arg1, int arg2, float arg3)
render(DrawContext arg0, int arg1, int arg2, float arg3)
public void
extractTooltip(GuiGraphicsExtractor graphics, int mouseX, int mouseY, Slot hoveredSlot)
extractTooltip(GuiGraphicsExtractor graphics, int mouseX, int mouseY, Slot hoveredSlot)
method_2601(class_332 arg0, int arg1, int arg2, class_1735 arg3)
drawTooltip(DrawContext context, int x, int y, Slot slot)
protected abstract Text
getRecipeFilterName()
getRecipeFilterName()
method_17064()
getToggleCraftableButtonText()
public void
extractGhostRecipe(GuiGraphicsExtractor graphics, boolean isResultSlotBig)
extractGhostRecipe(GuiGraphicsExtractor graphics, boolean isResultSlotBig)
method_2581(class_332 arg0, boolean arg1)
drawGhostSlots(DrawContext context, boolean resultHasPadding)
public boolean
mouseClicked(MouseButtonEvent event, boolean doubleClick)
mouseClicked(MouseButtonEvent event, boolean doubleClick)
method_25402(class_11909 arg0, boolean arg1)
mouseClicked(Click arg0, boolean arg1)
public boolean
mouseDragged(MouseButtonEvent event, double dx, double dy)
mouseDragged(MouseButtonEvent event, double dx, double dy)
method_25403(class_11909 arg0, double arg1, double arg2)
mouseDragged(Click arg0, double arg1, double arg2)
private boolean
tryPlaceRecipe(RecipeCollection recipeCollection, RecipeDisplayId recipe, boolean useMaxItems)
tryPlaceRecipe(RecipeCollection recipeCollection, RecipeDisplayId recipe, boolean useMaxItems)
method_62889(class_516 arg0, class_10298 arg1, boolean arg2)
select(RecipeResultCollection results, NetworkRecipeId recipeId, boolean craftAll)
private void
onTabButtonPress(Button button)
onTabButtonPress(Button button)
method_76630(class_4185 arg0)
onTabSelected(ButtonWidget button)
private void
replaceSelected(RecipeBookTabButton tabButton)
replaceSelected(RecipeBookTabButton tabButton)
method_76632(class_512 arg0)
setCurrentTab(RecipeGroupButtonWidget currentTab)
private void
toggleFiltering()
toggleFiltering()
method_2589()
toggleFilteringCraftable()
public boolean
hasClickedOutside(double mx, double my, int leftPos, int topPos, int imageWidth, int imageHeight)
hasClickedOutside(double mx, double my, int leftPos, int topPos, int imageWidth, int imageHeight)
method_2598(double arg0, double arg1, int arg2, int arg3, int arg4, int arg5)
isClickOutsideBounds(double mouseX, double mouseY, int x, int y, int backgroundWidth, int backgroundHeight)
public boolean
keyPressed(KeyEvent event)
keyPressed(KeyEvent event)
method_25404(class_11908 arg0)
keyPressed(KeyInput arg0)
public boolean
keyReleased(KeyEvent event)
keyReleased(KeyEvent event)
method_16803(class_11908 arg0)
keyReleased(KeyInput arg0)
public boolean
charTyped(CharacterEvent event)
charTyped(CharacterEvent event)
method_25400(class_11905 arg0)
charTyped(CharInput arg0)
public boolean
preeditUpdated(PreeditEvent event)
preeditUpdated(PreeditEvent event)
method_1_2559(class_1_359 arg0)
preEdit(ImePreEditInput arg0)
public boolean
isMouseOver(double mouseX, double mouseY)
isMouseOver(double mouseX, double mouseY)
method_25405(double arg0, double arg1)
isMouseOver(double arg0, double arg1)
public void
setFocused(boolean focused)
setFocused(boolean focused)
method_25365(boolean arg0)
setFocused(boolean arg0)
public boolean
isFocused()
isFocused()
method_25370()
isFocused()
public boolean
capturesInput()
capturesInput()
method_1_7532()
isAcceptingTextInput()
private void
checkSearchStringUpdate()
checkSearchStringUpdate()
method_2586()
refreshSearchResults()
private void
pirateSpeechForThePeople(String searchTarget)
pirateSpeechForThePeople(String searchTarget)
method_2576(String arg0)
triggerPirateSpeakEasterEgg(String search)
private boolean
isOffsetNextToMainGUI()
isOffsetNextToMainGUI()
method_2604()
isWide()
public void
recipesUpdated()
recipesUpdated()
method_2592()
refresh()
public void
recipeShown(RecipeDisplayId recipe)
recipeShown(RecipeDisplayId recipe)
method_64876(class_10298 arg0)
onRecipeDisplayed(NetworkRecipeId recipeId)
public void
fillGhostRecipe(RecipeDisplay recipe)
fillGhostRecipe(RecipeDisplay recipe)
method_64875(class_10295 arg0)
onCraftFailed(RecipeDisplay display)
protected abstract void
fillGhostRecipe(GhostSlots ghostSlots, RecipeDisplay recipe, ContextMap context)
fillGhostRecipe(GhostSlots ghostSlots, RecipeDisplay recipe, ContextMap context)
method_64868(class_9934 arg0, class_10295 arg1, class_10352 arg2)
showGhostRecipe(GhostRecipe ghostRecipe, RecipeDisplay display, ContextParameterMap context)
protected void
sendUpdateSettings()
sendUpdateSettings()
method_2588()
sendBookDataPacket()
public Selectable$SelectionType
narrationPriority()
narrationPriority()
method_37018()
getType()
public void
updateNarration(NarrationElementOutput output)
updateNarration(NarrationElementOutput output)
method_37020(class_6382 arg0)
appendNarrations(NarrationMessageBuilder arg0)