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
  • Field Details

    • RECIPE_BOOK_LOCATION

      protected static final ResourceLocation RECIPE_BOOK_LOCATION
    • SEARCH_HINT

      private static final Component SEARCH_HINT
    • IMAGE_WIDTH

      public static final int IMAGE_WIDTH
      See Also:
    • IMAGE_HEIGHT

      public static final int IMAGE_HEIGHT
      See Also:
    • OFFSET_X_POSITION

      private static final int OFFSET_X_POSITION
      See Also:
    • ONLY_CRAFTABLES_TOOLTIP

      private static final Component ONLY_CRAFTABLES_TOOLTIP
    • ALL_RECIPES_TOOLTIP

      private static final Component ALL_RECIPES_TOOLTIP
    • xOffset

      private int xOffset
    • width

      private int width
    • height

      private int height
    • ghostRecipe

      protected final GhostRecipe ghostRecipe
    • tabButtons

      private final List<RecipeBookTabButton> tabButtons
    • selectedTab

      @Nullable private RecipeBookTabButton selectedTab
    • filterButton

      protected StateSwitchingButton filterButton
    • minecraft

      protected Minecraft minecraft
    • lastSearch

      private String lastSearch
    • book

      private ClientRecipeBook book
    • recipeBookPage

      private final RecipeBookPage recipeBookPage
    • stackedContents

      private final StackedContents stackedContents
    • timesInventoryChanged

      private int timesInventoryChanged
    • ignoreTextInput

      private boolean ignoreTextInput
    • visible

      private boolean visible
    • widthTooNarrow

      private boolean widthTooNarrow
  • Constructor Details

    • RecipeBookComponent

      public RecipeBookComponent()
  • Method Details

    • init

      public void init(int p_100310_, int p_100311_, Minecraft p_100312_, boolean p_100313_, RecipeBookMenu<?> p_100314_)
    • initVisuals

      public void initVisuals()
    • updateFilterButtonTooltip

      private void updateFilterButtonTooltip()
    • initFilterButtonTextures

      protected void initFilterButtonTextures()
    • updateScreenPosition

      public int updateScreenPosition(int p_181402_, int p_181403_)
    • toggleVisibility

      public void toggleVisibility()
    • isVisible

      public boolean isVisible()
    • isVisibleAccordingToBookData

      private boolean isVisibleAccordingToBookData()
    • setVisible

      protected void setVisible(boolean p_100370_)
    • slotClicked

      public void slotClicked(@Nullable Slot p_100315_)
    • updateCollections

      private void updateCollections(boolean p_100383_)
    • updateTabs

      private void updateTabs()
    • tick

      public void tick()
    • updateStackedContents

      private void updateStackedContents()
    • render

      public void render(GuiGraphics p_283597_, int p_282668_, int p_283506_, float p_282813_)
      Specified by:
      render in interface Renderable
    • renderTooltip

      public void renderTooltip(GuiGraphics p_281740_, int p_281520_, int p_282050_, int p_282836_, int p_282758_)
    • getRecipeFilterName

      protected Component getRecipeFilterName()
    • renderGhostRecipeTooltip

      private void renderGhostRecipeTooltip(GuiGraphics p_282776_, int p_282886_, int p_281571_, int p_282948_, int p_283050_)
    • renderGhostRecipe

      public void renderGhostRecipe(GuiGraphics p_283634_, int p_283327_, int p_282027_, boolean p_283495_, float p_283514_)
    • mouseClicked

      public boolean mouseClicked(double p_100294_, double p_100295_, int p_100296_)
      Specified by:
      mouseClicked in interface GuiEventListener
    • toggleFiltering

      private boolean toggleFiltering()
    • hasClickedOutside

      public boolean hasClickedOutside(double p_100298_, double p_100299_, int p_100300_, int p_100301_, int p_100302_, int p_100303_, int p_100304_)
    • keyPressed

      public boolean keyPressed(int p_100306_, int p_100307_, int p_100308_)
      Specified by:
      keyPressed in interface GuiEventListener
    • keyReleased

      public boolean keyReleased(int p_100356_, int p_100357_, int p_100358_)
      Specified by:
      keyReleased in interface GuiEventListener
    • charTyped

      public boolean charTyped(char p_100291_, int p_100292_)
      Specified by:
      charTyped in interface GuiEventListener
    • isMouseOver

      public boolean isMouseOver(double p_100353_, double p_100354_)
      Specified by:
      isMouseOver in interface GuiEventListener
    • setFocused

      public void setFocused(boolean p_265089_)
      Specified by:
      setFocused in interface GuiEventListener
    • isFocused

      public boolean isFocused()
      Specified by:
      isFocused in interface GuiEventListener
    • checkSearchStringUpdate

      private void checkSearchStringUpdate()
    • pirateSpeechForThePeople

      private void pirateSpeechForThePeople(String p_100336_)
    • isOffsetNextToMainGUI

      private boolean isOffsetNextToMainGUI()
    • recipesUpdated

      public void recipesUpdated()
    • recipesShown

      public void recipesShown(List<Recipe<?>> p_100344_)
      Specified by:
      recipesShown in interface RecipeShownListener
    • setupGhostRecipe

      public void setupGhostRecipe(Recipe<?> p_100316_, List<Slot> p_100317_)
    • addItemToSlot

      public void addItemToSlot(Iterator<Ingredient> p_100338_, int p_100339_, int p_100340_, int p_100341_, int p_100342_)
      Specified by:
      addItemToSlot in interface PlaceRecipe<Ingredient>
    • sendUpdateSettings

      protected void sendUpdateSettings()
    • narrationPriority

      public NarratableEntry.NarrationPriority narrationPriority()
      Specified by:
      narrationPriority in interface NarratableEntry
    • updateNarration

      public void updateNarration(NarrationElementOutput p_170046_)
      Specified by:
      updateNarration in interface NarrationSupplier