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.class_507
net.minecraft.client.gui.screen.recipebook.RecipeBookWidget

Field summary

Modifier and TypeField
public static final ButtonTextures
RECIPE_BUTTON_SPRITES
field_45550
BUTTON_TEXTURES
protected static final Identifier
RECIPE_BOOK_LOCATION
field_3097
TEXTURE
private static final int
BACKGROUND_TEXTURE_WIDTH
field_52839
field_52839
private static final int
BACKGROUND_TEXTURE_HEIGHT
field_52840
field_52840
private static final Text
SEARCH_HINT
field_25711
SEARCH_HINT_TEXT
public static final int
IMAGE_WIDTH
field_32408
field_32408
public static final int
IMAGE_HEIGHT
field_32409
field_32409
private static final int
OFFSET_X_POSITION
field_32410
field_32410
private static final int
BORDER_WIDTH
field_54389
field_54389
private static final Text
ALL_RECIPES_TOOLTIP
field_26594
TOGGLE_ALL_RECIPES_TEXT
private static final int
TICKS_TO_SWAP_SLOT
field_52841
field_52841
private int
xOffset
field_3102
leftOffset
private int
width
field_3101
parentWidth
private int
height
field_3100
parentHeight
private float
time
field_52842
displayTime
private NetworkRecipeId
lastPlacedRecipe
field_54830
selectedRecipeId
private final GhostRecipe
ghostSlots
field_52843
ghostRecipe
private final List<RecipeGroupButtonWidget>
tabButtons
field_3094
tabButtons
private RecipeGroupButtonWidget
selectedTab
field_3098
currentTab
protected CyclingButtonWidget<Boolean>
filterButton
field_3088
toggleCraftableButton
protected final T
menu
field_3095
craftingScreenHandler
protected MinecraftClient
minecraft
field_3091
client
private TextFieldWidget
searchBox
field_3089
searchField
private String
lastSearch
field_3099
searchText
private final List<RecipeBookWidget$Tab>
tabInfos
field_54831
tabs
private ClientRecipeBook
book
field_3096
recipeBook
private final RecipeBookResults
recipeBookPage
field_3086
recipesArea
private NetworkRecipeId
lastRecipe
field_53832
selectedRecipe
private RecipeResultCollection
lastRecipeCollection
field_53833
selectedRecipeResults
private final RecipeFinder
stackedContents
field_3090
recipeFinder
private int
timesInventoryChanged
field_3093
cachedInvChangeCount
private boolean
ignoreTextInput
field_3087
searching
private boolean
visible
field_33679
open
private boolean
widthTooNarrow
field_34001
narrow
private ScreenRect
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)
method_2597(int arg0, int arg1, class_310 arg2, boolean arg3)
initialize(int parentWidth, int parentHeight, MinecraftClient client, boolean narrow)
private void
initVisuals()
method_2579()
reset()
private int
getYOrigin()
method_64366()
getTop()
private int
getXOrigin()
method_64367()
getLeft()
protected abstract ButtonTextures
getFilterButtonTextures()
method_76629()
getBookButtonTextures()
public int
updateScreenPosition(int width, int imageWidth)
method_2595(int arg0, int arg1)
findLeftEdge(int width, int backgroundWidth)
public void
toggleVisibility()
method_2591()
toggleOpen()
public boolean
isVisible()
method_2605()
isOpen()
private boolean
isVisibleAccordingToBookData()
method_36485()
isGuiOpen()
protected void
setVisible(boolean visible)
method_2593(boolean arg0)
setOpen(boolean opened)
protected abstract boolean
isCraftingSlot(Slot slot)
method_62023(class_1735 arg0)
isCraftingSlot(Slot slot)
public void
slotClicked(Slot slot)
method_62044(class_1735 arg0)
onMouseClick(Slot slot)
private void
selectMatchingRecipes()
method_65072()
populateAllRecipes()
protected abstract void
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)
method_2603(boolean arg0, boolean arg1)
refreshResults(boolean resetCurrentPage, boolean filteringCraftable)
private void
updateTabs(boolean isFiltering)
method_2606(boolean arg0)
refreshTabButtons(boolean filteringCraftable)
public void
tick()
method_2590()
update()
private void
updateStackedContents()
method_2587()
refreshInputs()
private boolean
isFiltering()
method_62045()
isFilteringCraftable()
public void
render(GuiGraphics 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
renderTooltip(GuiGraphics 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()
method_17064()
getToggleCraftableButtonText()
public void
renderGhostRecipe(GuiGraphics graphics, boolean isResultSlotBig)
method_2581(class_332 arg0, boolean arg1)
drawGhostSlots(DrawContext context, boolean resultHasPadding)
public boolean
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)
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)
method_62889(class_516 arg0, class_10298 arg1, boolean arg2)
select(RecipeResultCollection results, NetworkRecipeId recipeId, boolean craftAll)
private void
onTabButtonPress(Button button)
method_76630(class_4185 arg0)
onTabSelected(ButtonWidget button)
private void
replaceSelected(RecipeBookTabButton tabButton)
method_76632(class_512 arg0)
setCurrentTab(RecipeGroupButtonWidget currentTab)
private void
toggleFiltering()
method_2589()
toggleFilteringCraftable()
public boolean
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)
method_25404(class_11908 arg0)
keyPressed(KeyInput arg0)
public boolean
keyReleased(KeyEvent event)
method_16803(class_11908 arg0)
keyReleased(KeyInput arg0)
public boolean
charTyped(CharacterEvent event)
method_25400(class_11905 arg0)
charTyped(CharInput arg0)
public boolean
isMouseOver(double mouseX, double mouseY)
method_25405(double arg0, double arg1)
isMouseOver(double arg0, double arg1)
public void
setFocused(boolean focused)
method_25365(boolean arg0)
setFocused(boolean arg0)
public boolean
isFocused()
method_25370()
isFocused()
private void
checkSearchStringUpdate()
method_2586()
refreshSearchResults()
private void
pirateSpeechForThePeople(String searchTarget)
method_2576(String arg0)
triggerPirateSpeakEasterEgg(String search)
private boolean
isOffsetNextToMainGUI()
method_2604()
isWide()
public void
recipesUpdated()
method_2592()
refresh()
public void
recipeShown(RecipeDisplayId recipe)
method_64876(class_10298 arg0)
onRecipeDisplayed(NetworkRecipeId recipeId)
public void
fillGhostRecipe(RecipeDisplay recipe)
method_64875(class_10295 arg0)
onCraftFailed(RecipeDisplay display)
protected abstract void
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()
method_2588()
sendBookDataPacket()
public Selectable$SelectionType
narrationPriority()
method_37018()
getType()
public void
updateNarration(NarrationElementOutput output)
method_37020(class_6382 arg0)
appendNarrations(NarrationMessageBuilder arg0)
private static void
lambda$updateNarration$8(List arg0, AbstractWidget arg1)
method_37308(List arg0, class_339 arg1)
method_37308(List arg0, ClickableWidget button)
private static boolean
lambda$updateCollections$7(RecipeCollection arg0)
method_2584(class_516 arg0)
method_2584(RecipeResultCollection resultCollection)
private static boolean
lambda$updateCollections$6(it.unimi.dsi.fastutil.objects.ObjectSet arg0, RecipeCollection arg1)
method_53871(it.unimi.dsi.fastutil.objects.ObjectSet arg0, class_516 arg1)
method_53871(it.unimi.dsi.fastutil.objects.ObjectSet arg0, RecipeResultCollection resultCollection)
private static boolean
lambda$updateCollections$5(RecipeCollection arg0)
method_64877(class_516 arg0)
method_64877(RecipeResultCollection resultCollection)
private boolean
lambda$initVisuals$4(RecipeBookTabButton arg0)
method_2582(class_512 arg0)
method_2582(RecipeGroupButtonWidget button)
private void
lambda$initVisuals$3(CycleButton arg0, Boolean arg1)
method_76631(class_5676 arg0, Boolean arg1)
method_76631(CyclingButtonWidget button, Boolean value)
private Identifier
lambda$initVisuals$2(CycleButton arg0, Boolean arg1)
method_76634(class_5676 arg0, Boolean arg1)
method_76634(CyclingButtonWidget button, Boolean value)
private Tooltip
lambda$initVisuals$1(Boolean arg0)
method_76633(Boolean arg0)
method_76633(Boolean value)
private int
lambda$new$0()
method_62047()
method_62047()