Class StackedContents.RecipePicker
java.lang.Object
net.minecraft.world.entity.player.StackedContents.RecipePicker
- Enclosing class:
StackedContents
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BitSet
private final int
private final List
<Ingredient> private final int
private final int[]
private final it.unimi.dsi.fastutil.ints.IntList
private final Recipe
<?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
dfs
(int amount) private int
getIndex
(boolean isIngredientPath, int stackingIndex, int pathIndex) private int
private int
getSatisfiedIndex
(int stackingIndex) private int[]
private int
getVisitedIndex
(boolean isIngredientPath, int pathIndex) private boolean
hasConnection
(boolean isIngredientPath, int stackingIndex, int pathIndex) private boolean
hasResidual
(boolean isIngredientPath, int stackingIndex, int pathIndex) private boolean
hasVisited
(boolean isIngredientPath, int pathIndex) private boolean
isSatisfied
(int stackingIndex) private void
setSatisfied
(int stackingIndex) private void
toggleResidual
(boolean isIngredientPath, int stackingIndex, int pathIndex) boolean
tryPick
(int amount, it.unimi.dsi.fastutil.ints.IntList stackingIndexList) int
tryPickAll
(int amount, it.unimi.dsi.fastutil.ints.IntList stackingIndexList) private void
visit
(boolean isIngredientPath, int pathIndex)
-
Field Details
-
recipe
-
ingredients
-
ingredientCount
private final int ingredientCount -
items
private final int[] items -
itemCount
private final int itemCount -
data
-
path
private final it.unimi.dsi.fastutil.ints.IntList path
-
-
Constructor Details
-
RecipePicker
-
-
Method Details
-
tryPick
public boolean tryPick(int amount, @Nullable it.unimi.dsi.fastutil.ints.IntList stackingIndexList) -
getUniqueAvailableIngredientItems
private int[] getUniqueAvailableIngredientItems() -
dfs
private boolean dfs(int amount) -
isSatisfied
private boolean isSatisfied(int stackingIndex) -
setSatisfied
private void setSatisfied(int stackingIndex) -
getSatisfiedIndex
private int getSatisfiedIndex(int stackingIndex) -
hasConnection
private boolean hasConnection(boolean isIngredientPath, int stackingIndex, int pathIndex) -
hasResidual
private boolean hasResidual(boolean isIngredientPath, int stackingIndex, int pathIndex) -
toggleResidual
private void toggleResidual(boolean isIngredientPath, int stackingIndex, int pathIndex) -
getIndex
private int getIndex(boolean isIngredientPath, int stackingIndex, int pathIndex) -
visit
private void visit(boolean isIngredientPath, int pathIndex) -
hasVisited
private boolean hasVisited(boolean isIngredientPath, int pathIndex) -
getVisitedIndex
private int getVisitedIndex(boolean isIngredientPath, int pathIndex) -
tryPickAll
public int tryPickAll(int amount, @Nullable it.unimi.dsi.fastutil.ints.IntList stackingIndexList) -
getMinIngredientCount
private int getMinIngredientCount()
-