类 RecipeBookComponent
java.lang.Object
net.minecraft.client.gui.screens.recipebook.RecipeBookComponent
- 所有已实现的接口:
GuiEventListener
,Renderable
,TabOrderedElement
,NarratableEntry
,NarrationSupplier
,RecipeShownListener
,PlaceRecipe<Ingredient>
public class RecipeBookComponent
extends Object
implements PlaceRecipe<Ingredient>, Renderable, GuiEventListener, NarratableEntry, RecipeShownListener
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
字段概要
字段修饰符和类型字段说明private static final Component
private ClientRecipeBook
protected StateSwitchingButton
protected final GhostRecipe
private int
private boolean
static final int
static final int
private String
protected RecipeBookMenu<?>
protected Minecraft
private static final int
private static final Component
protected static final ResourceLocation
private final RecipeBookPage
private static final Component
private EditBox
private RecipeBookTabButton
private final StackedContents
private final List<RecipeBookTabButton>
private int
private boolean
private int
private boolean
private int
从接口继承的字段 net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
addItemToSlot
(Iterator<Ingredient> pIngredients, int pSlot, int pMaxAmount, int pY, int pX) boolean
charTyped
(char pCodePoint, int pModifiers) private void
protected Component
boolean
hasClickedOutside
(double pMouseX, double pMouseY, int pX, int pY, int pWidth, int pHeight, int p_100304_) void
init
(int pWidth, int pHeight, Minecraft pMinecraft, boolean pWidthTooNarrow, RecipeBookMenu<?> pMenu) protected void
void
boolean
boolean
isMouseOver
(double pMouseX, double pMouseY) private boolean
boolean
private boolean
boolean
keyPressed
(int pKeyCode, int pScanCode, int pModifiers) boolean
keyReleased
(int pKeyCode, int pScanCode, int pModifiers) boolean
mouseClicked
(double pMouseX, double pMouseY, int pButton) private void
pirateSpeechForThePeople
(String pText) void
recipesShown
(List<Recipe<?>> pRecipes) void
void
render
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) void
renderGhostRecipe
(GuiGraphics pGuiGraphics, int pLeftPos, int pTopPos, boolean p_283495_, float pPartialTick) private void
renderGhostRecipeTooltip
(GuiGraphics pGuiGraphics, int p_282886_, int p_281571_, int pMouseX, int pMouseY) void
renderTooltip
(GuiGraphics pGuiGraphics, int pRenderX, int pRenderY, int pMouseX, int pMouseY) protected void
void
setFocused
(boolean pFocused) void
setupGhostRecipe
(Recipe<?> pRecipe, List<Slot> pSlots) protected void
setVisible
(boolean pVisible) void
slotClicked
(Slot pSlot) void
tick()
private boolean
void
private void
updateCollections
(boolean p_100383_) private void
void
updateNarration
(NarrationElementOutput pNarrationElementOutput) int
updateScreenPosition
(int p_181402_, int p_181403_) private void
private void
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.client.gui.components.events.GuiEventListener
getCurrentFocusPath, getRectangle, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPath
从接口继承的方法 net.minecraft.client.gui.narration.NarratableEntry
isActive
从接口继承的方法 net.minecraft.recipebook.PlaceRecipe
placeRecipe
从接口继承的方法 net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
字段详细资料
-
RECIPE_BOOK_LOCATION
-
SEARCH_HINT
-
IMAGE_WIDTH
public static final int IMAGE_WIDTH- 另请参阅:
-
IMAGE_HEIGHT
public static final int IMAGE_HEIGHT- 另请参阅:
-
OFFSET_X_POSITION
private static final int OFFSET_X_POSITION- 另请参阅:
-
ONLY_CRAFTABLES_TOOLTIP
-
ALL_RECIPES_TOOLTIP
-
xOffset
private int xOffset -
width
private int width -
height
private int height -
ghostRecipe
-
tabButtons
-
selectedTab
-
filterButton
-
minecraft
-
searchBox
-
lastSearch
-
book
-
recipeBookPage
-
stackedContents
-
timesInventoryChanged
private int timesInventoryChanged -
ignoreTextInput
private boolean ignoreTextInput -
visible
private boolean visible -
widthTooNarrow
private boolean widthTooNarrow
-
-
构造器详细资料
-
RecipeBookComponent
public RecipeBookComponent()
-
-
方法详细资料
-
init
public void init(int pWidth, int pHeight, Minecraft pMinecraft, boolean pWidthTooNarrow, RecipeBookMenu<?> pMenu) -
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 pVisible) -
slotClicked
-
updateCollections
private void updateCollections(boolean p_100383_) -
updateTabs
private void updateTabs() -
tick
public void tick() -
updateStackedContents
private void updateStackedContents() -
render
- 指定者:
render
在接口中Renderable
-
renderTooltip
public void renderTooltip(GuiGraphics pGuiGraphics, int pRenderX, int pRenderY, int pMouseX, int pMouseY) -
getRecipeFilterName
-
renderGhostRecipeTooltip
private void renderGhostRecipeTooltip(GuiGraphics pGuiGraphics, int p_282886_, int p_281571_, int pMouseX, int pMouseY) -
renderGhostRecipe
public void renderGhostRecipe(GuiGraphics pGuiGraphics, int pLeftPos, int pTopPos, boolean p_283495_, float pPartialTick) -
mouseClicked
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) - 指定者:
mouseClicked
在接口中GuiEventListener
-
toggleFiltering
private boolean toggleFiltering() -
hasClickedOutside
public boolean hasClickedOutside(double pMouseX, double pMouseY, int pX, int pY, int pWidth, int pHeight, int p_100304_) -
keyPressed
public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) - 指定者:
keyPressed
在接口中GuiEventListener
-
keyReleased
public boolean keyReleased(int pKeyCode, int pScanCode, int pModifiers) - 指定者:
keyReleased
在接口中GuiEventListener
-
charTyped
public boolean charTyped(char pCodePoint, int pModifiers) - 指定者:
charTyped
在接口中GuiEventListener
-
isMouseOver
public boolean isMouseOver(double pMouseX, double pMouseY) - 指定者:
isMouseOver
在接口中GuiEventListener
-
setFocused
public void setFocused(boolean pFocused) - 指定者:
setFocused
在接口中GuiEventListener
-
isFocused
public boolean isFocused()- 指定者:
isFocused
在接口中GuiEventListener
-
checkSearchStringUpdate
private void checkSearchStringUpdate() -
pirateSpeechForThePeople
-
isOffsetNextToMainGUI
private boolean isOffsetNextToMainGUI() -
recipesUpdated
public void recipesUpdated() -
recipesShown
- 指定者:
recipesShown
在接口中RecipeShownListener
-
setupGhostRecipe
-
addItemToSlot
public void addItemToSlot(Iterator<Ingredient> pIngredients, int pSlot, int pMaxAmount, int pY, int pX) - 指定者:
addItemToSlot
在接口中PlaceRecipe<Ingredient>
-
sendUpdateSettings
protected void sendUpdateSettings() -
narrationPriority
- 指定者:
narrationPriority
在接口中NarratableEntry
-
updateNarration
- 指定者:
updateNarration
在接口中NarrationSupplier
-