Class RecipeBookComponent<T extends RecipeBookMenu>

java.lang.Object
net.minecraft.client.gui.screens.recipebook.RecipeBookComponent<T>
All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, NarratableEntry, NarrationSupplier
Direct Known Subclasses:
CraftingRecipeBookComponent, FurnaceRecipeBookComponent

public abstract class RecipeBookComponent<T extends RecipeBookMenu> extends Object implements GuiEventListener, Renderable, NarratableEntry
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init(int width, int height, Minecraft minecraft, boolean widthTooNarrow)
    • initVisuals

      private void initVisuals()
    • getYOrigin

      private int getYOrigin()
    • getXOrigin

      private int getXOrigin()
    • getFilterButtonTextures

      protected abstract WidgetSprites getFilterButtonTextures()
    • updateScreenPosition

      public int updateScreenPosition(int width, int imageWidth)
    • toggleVisibility

      public void toggleVisibility()
    • isVisible

      public boolean isVisible()
    • isVisibleAccordingToBookData

      private boolean isVisibleAccordingToBookData()
    • setVisible

      protected void setVisible(boolean visible)
    • isCraftingSlot

      protected abstract boolean isCraftingSlot(Slot slot)
    • slotClicked

      public void slotClicked(@Nullable Slot slot)
    • selectMatchingRecipes

      private void selectMatchingRecipes()
    • selectMatchingRecipes

      protected abstract void selectMatchingRecipes(RecipeCollection collection, StackedItemContents stackedContents)
    • updateCollections

      private void updateCollections(boolean resetPage, boolean isFiltering)
    • updateTabs

      private void updateTabs(boolean isFiltering)
    • tick

      public void tick()
    • updateStackedContents

      private void updateStackedContents()
    • isFiltering

      private boolean isFiltering()
    • extractRenderState

      public void extractRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
      Specified by:
      extractRenderState in interface Renderable
    • extractTooltip

      public void extractTooltip(GuiGraphicsExtractor graphics, int mouseX, int mouseY, @Nullable Slot hoveredSlot)
    • getRecipeFilterName

      protected abstract Component getRecipeFilterName()
    • extractGhostRecipe

      public void extractGhostRecipe(GuiGraphicsExtractor graphics, boolean isResultSlotBig)
    • mouseClicked

      public boolean mouseClicked(MouseButtonEvent event, boolean doubleClick)
      Specified by:
      mouseClicked in interface GuiEventListener
    • mouseDragged

      public boolean mouseDragged(MouseButtonEvent event, double dx, double dy)
      Specified by:
      mouseDragged in interface GuiEventListener
    • tryPlaceRecipe

      private boolean tryPlaceRecipe(RecipeCollection recipeCollection, RecipeDisplayId recipe, boolean useMaxItems)
    • onTabButtonPress

      private void onTabButtonPress(Button button)
    • replaceSelected

      private void replaceSelected(RecipeBookTabButton tabButton)
    • toggleFiltering

      private void toggleFiltering()
    • hasClickedOutside

      public boolean hasClickedOutside(double mx, double my, int leftPos, int topPos, int imageWidth, int imageHeight)
    • keyPressed

      public boolean keyPressed(KeyEvent event)
      Specified by:
      keyPressed in interface GuiEventListener
    • keyReleased

      public boolean keyReleased(KeyEvent event)
      Specified by:
      keyReleased in interface GuiEventListener
    • charTyped

      public boolean charTyped(CharacterEvent event)
      Specified by:
      charTyped in interface GuiEventListener
    • preeditUpdated

      public boolean preeditUpdated(@Nullable PreeditEvent event)
      Specified by:
      preeditUpdated in interface GuiEventListener
    • isMouseOver

      public boolean isMouseOver(double mouseX, double mouseY)
      Specified by:
      isMouseOver in interface GuiEventListener
    • setFocused

      public void setFocused(boolean focused)
      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 searchTarget)
    • isOffsetNextToMainGUI

      private boolean isOffsetNextToMainGUI()
    • recipesUpdated

      public void recipesUpdated()
    • recipeShown

      public void recipeShown(RecipeDisplayId recipe)
    • fillGhostRecipe

      public void fillGhostRecipe(RecipeDisplay recipe)
    • fillGhostRecipe

      protected abstract void fillGhostRecipe(GhostSlots ghostSlots, RecipeDisplay recipe, ContextMap context)
    • sendUpdateSettings

      protected void sendUpdateSettings()
    • narrationPriority

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

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