Class RecipeBookGui
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.recipebook.RecipeBookGui
-
- All Implemented Interfaces:
IGuiEventListener,IRenderable,IRecipeUpdateListener,IRecipePlacer<Ingredient>
- Direct Known Subclasses:
AbstractRecipeBookGui
public class RecipeBookGui extends AbstractGui implements IRenderable, IGuiEventListener, IRecipeUpdateListener, IRecipePlacer<Ingredient>
-
-
Field Summary
Fields Modifier and Type Field Description private static ITextComponentALL_RECIPES_TOOLTIPprivate ClientRecipeBookbookprotected ToggleWidgetfilterButtonprotected GhostRecipeghostRecipeprivate intheightprivate booleanignoreTextInputprivate java.lang.StringlastSearchprotected RecipeBookContainer<?>menuprotected Minecraftminecraftprivate static ITextComponentONLY_CRAFTABLES_TOOLTIPprotected static ResourceLocationRECIPE_BOOK_LOCATIONprivate RecipeBookPagerecipeBookPageprivate static ITextComponentSEARCH_HINTprivate TextFieldWidgetsearchBoxprivate RecipeTabToggleWidgetselectedTabprivate RecipeItemHelperstackedContentsprivate java.util.List<RecipeTabToggleWidget>tabButtonsprivate inttimesInventoryChangedprivate intwidthprivate intxOffset-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description RecipeBookGui()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddItemToSlot(java.util.Iterator<Ingredient> p_201500_1_, int p_201500_2_, int p_201500_3_, int p_201500_4_, int p_201500_5_)booleanchangeFocus(boolean p_231049_1_)booleancharTyped(char p_231042_1_, int p_231042_2_)private voidcheckSearchStringUpdate()private ITextComponentgetFilterButtonTooltip()protected ITextComponentgetRecipeFilterName()booleanhasClickedOutside(double p_195604_1_, double p_195604_3_, int p_195604_5_, int p_195604_6_, int p_195604_7_, int p_195604_8_, int p_195604_9_)voidinit(int p_201520_1_, int p_201520_2_, Minecraft p_201520_3_, boolean p_201520_4_, RecipeBookContainer<?> p_201520_5_)protected voidinitFilterButtonTextures()voidinitVisuals(boolean p_201518_1_)booleanisMouseOver(double p_231047_1_, double p_231047_3_)private booleanisOffsetNextToMainGUI()booleanisVisible()booleankeyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)booleankeyReleased(int p_223281_1_, int p_223281_2_, int p_223281_3_)booleanmouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)private voidpirateSpeechForThePeople(java.lang.String p_193716_1_)voidrecipesShown(java.util.List<IRecipe<?>> p_193001_1_)voidrecipesUpdated()voidremoved()voidrender(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)voidrenderGhostRecipe(MatrixStack p_230477_1_, int p_230477_2_, int p_230477_3_, boolean p_230477_4_, float p_230477_5_)private voidrenderGhostRecipeTooltip(MatrixStack p_238925_1_, int p_238925_2_, int p_238925_3_, int p_238925_4_, int p_238925_5_)voidrenderTooltip(MatrixStack p_238924_1_, int p_238924_2_, int p_238924_3_, int p_238924_4_, int p_238924_5_)protected voidsendUpdateSettings()voidsetupGhostRecipe(IRecipe<?> p_193951_1_, java.util.List<Slot> p_193951_2_)protected voidsetVisible(boolean p_193006_1_)voidslotClicked(Slot p_191874_1_)voidtick()private booleantoggleFiltering()voidtoggleVisibility()private voidupdateCollections(boolean p_193003_1_)intupdateScreenPosition(boolean p_193011_1_, int p_193011_2_, int p_193011_3_)private voidupdateStackedContents()private voidupdateTabs()-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.gui.IGuiEventListener
mouseDragged, mouseMoved, mouseReleased, mouseScrolled
-
Methods inherited from interface net.minecraft.item.crafting.IRecipePlacer
placeRecipe
-
-
-
-
Field Detail
-
RECIPE_BOOK_LOCATION
protected static final ResourceLocation RECIPE_BOOK_LOCATION
-
SEARCH_HINT
private static final ITextComponent SEARCH_HINT
-
ONLY_CRAFTABLES_TOOLTIP
private static final ITextComponent ONLY_CRAFTABLES_TOOLTIP
-
ALL_RECIPES_TOOLTIP
private static final ITextComponent ALL_RECIPES_TOOLTIP
-
xOffset
private int xOffset
-
width
private int width
-
height
private int height
-
ghostRecipe
protected final GhostRecipe ghostRecipe
-
tabButtons
private final java.util.List<RecipeTabToggleWidget> tabButtons
-
selectedTab
private RecipeTabToggleWidget selectedTab
-
filterButton
protected ToggleWidget filterButton
-
menu
protected RecipeBookContainer<?> menu
-
minecraft
protected Minecraft minecraft
-
searchBox
private TextFieldWidget searchBox
-
lastSearch
private java.lang.String lastSearch
-
book
private ClientRecipeBook book
-
recipeBookPage
private final RecipeBookPage recipeBookPage
-
stackedContents
private final RecipeItemHelper stackedContents
-
timesInventoryChanged
private int timesInventoryChanged
-
ignoreTextInput
private boolean ignoreTextInput
-
-
Method Detail
-
init
public void init(int p_201520_1_, int p_201520_2_, Minecraft p_201520_3_, boolean p_201520_4_, RecipeBookContainer<?> p_201520_5_)
-
initVisuals
public void initVisuals(boolean p_201518_1_)
-
changeFocus
public boolean changeFocus(boolean p_231049_1_)
- Specified by:
changeFocusin interfaceIGuiEventListener
-
initFilterButtonTextures
protected void initFilterButtonTextures()
-
removed
public void removed()
-
updateScreenPosition
public int updateScreenPosition(boolean p_193011_1_, int p_193011_2_, int p_193011_3_)
-
toggleVisibility
public void toggleVisibility()
-
isVisible
public boolean isVisible()
-
setVisible
protected void setVisible(boolean p_193006_1_)
-
slotClicked
public void slotClicked(@Nullable Slot p_191874_1_)
-
updateCollections
private void updateCollections(boolean p_193003_1_)
-
updateTabs
private void updateTabs()
-
tick
public void tick()
-
updateStackedContents
private void updateStackedContents()
-
render
public void render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
- Specified by:
renderin interfaceIRenderable
-
renderTooltip
public void renderTooltip(MatrixStack p_238924_1_, int p_238924_2_, int p_238924_3_, int p_238924_4_, int p_238924_5_)
-
getFilterButtonTooltip
private ITextComponent getFilterButtonTooltip()
-
getRecipeFilterName
protected ITextComponent getRecipeFilterName()
-
renderGhostRecipeTooltip
private void renderGhostRecipeTooltip(MatrixStack p_238925_1_, int p_238925_2_, int p_238925_3_, int p_238925_4_, int p_238925_5_)
-
renderGhostRecipe
public void renderGhostRecipe(MatrixStack p_230477_1_, int p_230477_2_, int p_230477_3_, boolean p_230477_4_, float p_230477_5_)
-
mouseClicked
public boolean mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)- Specified by:
mouseClickedin interfaceIGuiEventListener
-
toggleFiltering
private boolean toggleFiltering()
-
hasClickedOutside
public boolean hasClickedOutside(double p_195604_1_, double p_195604_3_, int p_195604_5_, int p_195604_6_, int p_195604_7_, int p_195604_8_, int p_195604_9_)
-
keyPressed
public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)- Specified by:
keyPressedin interfaceIGuiEventListener
-
keyReleased
public boolean keyReleased(int p_223281_1_, int p_223281_2_, int p_223281_3_)- Specified by:
keyReleasedin interfaceIGuiEventListener
-
charTyped
public boolean charTyped(char p_231042_1_, int p_231042_2_)- Specified by:
charTypedin interfaceIGuiEventListener
-
isMouseOver
public boolean isMouseOver(double p_231047_1_, double p_231047_3_)- Specified by:
isMouseOverin interfaceIGuiEventListener
-
checkSearchStringUpdate
private void checkSearchStringUpdate()
-
pirateSpeechForThePeople
private void pirateSpeechForThePeople(java.lang.String p_193716_1_)
-
isOffsetNextToMainGUI
private boolean isOffsetNextToMainGUI()
-
recipesUpdated
public void recipesUpdated()
-
recipesShown
public void recipesShown(java.util.List<IRecipe<?>> p_193001_1_)
- Specified by:
recipesShownin interfaceIRecipeUpdateListener
-
setupGhostRecipe
public void setupGhostRecipe(IRecipe<?> p_193951_1_, java.util.List<Slot> p_193951_2_)
-
addItemToSlot
public void addItemToSlot(java.util.Iterator<Ingredient> p_201500_1_, int p_201500_2_, int p_201500_3_, int p_201500_4_, int p_201500_5_)
- Specified by:
addItemToSlotin interfaceIRecipePlacer<Ingredient>
-
sendUpdateSettings
protected void sendUpdateSettings()
-
-