Class RecipeCollection
java.lang.Object
net.minecraft.client.gui.screens.recipebook.RecipeCollection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set
<RecipeHolder<?>> private final Set
<RecipeHolder<?>> private final Set
<RecipeHolder<?>> private final List
<RecipeHolder<?>> private final RegistryAccess
private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionRecipeCollection
(RegistryAccess registryAccess, List<RecipeHolder<?>> recipes) -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
allRecipesHaveSameResult
(RegistryAccess registryAccess, List<RecipeHolder<?>> recipes) void
canCraft
(StackedContents handler, int width, int height, RecipeBook book) List
<RecipeHolder<?>> getDisplayRecipes
(boolean craftable) List
<RecipeHolder<?>> List
<RecipeHolder<?>> getRecipes
(boolean onlyCraftable) boolean
boolean
boolean
boolean
boolean
isCraftable
(RecipeHolder<?> recipe) void
updateKnownRecipes
(RecipeBook book)
-
Field Details
-
registryAccess
-
recipes
-
singleResultItem
private final boolean singleResultItem -
craftable
-
fitsDimensions
-
known
-
-
Constructor Details
-
RecipeCollection
-
-
Method Details
-
allRecipesHaveSameResult
private static boolean allRecipesHaveSameResult(RegistryAccess registryAccess, List<RecipeHolder<?>> recipes) -
registryAccess
-
hasKnownRecipes
public boolean hasKnownRecipes() -
updateKnownRecipes
-
canCraft
-
isCraftable
-
hasCraftable
public boolean hasCraftable() -
hasFitting
public boolean hasFitting() -
getRecipes
-
getRecipes
-
getDisplayRecipes
- Parameters:
craftable
- If true, this method will only return craftable recipes. If false, this method will only return uncraftable recipes.
-
hasSingleResultItem
public boolean hasSingleResultItem()
-