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 ITextComponent
ALL_RECIPES_TOOLTIP
private ClientRecipeBook
book
protected ToggleWidget
filterButton
protected GhostRecipe
ghostRecipe
private int
height
private boolean
ignoreTextInput
private java.lang.String
lastSearch
protected RecipeBookContainer<?>
menu
protected Minecraft
minecraft
private static ITextComponent
ONLY_CRAFTABLES_TOOLTIP
protected static ResourceLocation
RECIPE_BOOK_LOCATION
private RecipeBookPage
recipeBookPage
private static ITextComponent
SEARCH_HINT
private TextFieldWidget
searchBox
private RecipeTabToggleWidget
selectedTab
private RecipeItemHelper
stackedContents
private java.util.List<RecipeTabToggleWidget>
tabButtons
private int
timesInventoryChanged
private int
width
private int
xOffset
-
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 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_)
boolean
changeFocus(boolean p_231049_1_)
boolean
charTyped(char p_231042_1_, int p_231042_2_)
private void
checkSearchStringUpdate()
private ITextComponent
getFilterButtonTooltip()
protected ITextComponent
getRecipeFilterName()
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_)
void
init(int p_201520_1_, int p_201520_2_, Minecraft p_201520_3_, boolean p_201520_4_, RecipeBookContainer<?> p_201520_5_)
protected void
initFilterButtonTextures()
void
initVisuals(boolean p_201518_1_)
boolean
isMouseOver(double p_231047_1_, double p_231047_3_)
private boolean
isOffsetNextToMainGUI()
boolean
isVisible()
boolean
keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
boolean
keyReleased(int p_223281_1_, int p_223281_2_, int p_223281_3_)
boolean
mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)
private void
pirateSpeechForThePeople(java.lang.String p_193716_1_)
void
recipesShown(java.util.List<IRecipe<?>> p_193001_1_)
void
recipesUpdated()
void
removed()
void
render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
void
renderGhostRecipe(MatrixStack p_230477_1_, int p_230477_2_, int p_230477_3_, boolean p_230477_4_, float p_230477_5_)
private void
renderGhostRecipeTooltip(MatrixStack p_238925_1_, int p_238925_2_, int p_238925_3_, int p_238925_4_, int p_238925_5_)
void
renderTooltip(MatrixStack p_238924_1_, int p_238924_2_, int p_238924_3_, int p_238924_4_, int p_238924_5_)
protected void
sendUpdateSettings()
void
setupGhostRecipe(IRecipe<?> p_193951_1_, java.util.List<Slot> p_193951_2_)
protected void
setVisible(boolean p_193006_1_)
void
slotClicked(Slot p_191874_1_)
void
tick()
private boolean
toggleFiltering()
void
toggleVisibility()
private void
updateCollections(boolean p_193003_1_)
int
updateScreenPosition(boolean p_193011_1_, int p_193011_2_, int p_193011_3_)
private void
updateStackedContents()
private void
updateTabs()
-
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:
changeFocus
in 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:
render
in 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:
mouseClicked
in 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:
keyPressed
in interfaceIGuiEventListener
-
keyReleased
public boolean keyReleased(int p_223281_1_, int p_223281_2_, int p_223281_3_)
- Specified by:
keyReleased
in interfaceIGuiEventListener
-
charTyped
public boolean charTyped(char p_231042_1_, int p_231042_2_)
- Specified by:
charTyped
in interfaceIGuiEventListener
-
isMouseOver
public boolean isMouseOver(double p_231047_1_, double p_231047_3_)
- Specified by:
isMouseOver
in 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:
recipesShown
in 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:
addItemToSlot
in interfaceIRecipePlacer<Ingredient>
-
sendUpdateSettings
protected void sendUpdateSettings()
-
-