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 pAmount) private int
getIndex
(boolean pIsIngredientPath, int pStackingIndex, int pPathIndex) private int
private int
getSatisfiedIndex
(int pStackingIndex) private int[]
private int
getVisitedIndex
(boolean pIsIngredientPath, int pPathIndex) private boolean
hasConnection
(boolean pIsIngredientPath, int pStackingIndex, int pPathIndex) private boolean
hasResidual
(boolean pIsIngredientPath, int pStackingIndex, int pPathIndex) private boolean
hasVisited
(boolean pIsIngredientPath, int pPathIndex) private boolean
isSatisfied
(int pStackingIndex) private void
setSatisfied
(int pStackingIndex) private void
toggleResidual
(boolean pIsIngredientPath, int pStackingIndex, int pPathIndex) boolean
tryPick
(int p_36513_, it.unimi.dsi.fastutil.ints.IntList p_36514_) int
tryPickAll
(int p_36526_, it.unimi.dsi.fastutil.ints.IntList p_36527_) private void
visit
(boolean pIsIngredientPath, int pPathIndex)
-
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 p_36513_, @Nullable it.unimi.dsi.fastutil.ints.IntList p_36514_) -
getUniqueAvailableIngredientItems
private int[] getUniqueAvailableIngredientItems() -
dfs
private boolean dfs(int pAmount) -
isSatisfied
private boolean isSatisfied(int pStackingIndex) -
setSatisfied
private void setSatisfied(int pStackingIndex) -
getSatisfiedIndex
private int getSatisfiedIndex(int pStackingIndex) -
hasConnection
private boolean hasConnection(boolean pIsIngredientPath, int pStackingIndex, int pPathIndex) -
hasResidual
private boolean hasResidual(boolean pIsIngredientPath, int pStackingIndex, int pPathIndex) -
toggleResidual
private void toggleResidual(boolean pIsIngredientPath, int pStackingIndex, int pPathIndex) -
getIndex
private int getIndex(boolean pIsIngredientPath, int pStackingIndex, int pPathIndex) -
visit
private void visit(boolean pIsIngredientPath, int pPathIndex) -
hasVisited
private boolean hasVisited(boolean pIsIngredientPath, int pPathIndex) -
getVisitedIndex
private int getVisitedIndex(boolean pIsIngredientPath, int pPathIndex) -
tryPickAll
public int tryPickAll(int p_36526_, @Nullable it.unimi.dsi.fastutil.ints.IntList p_36527_) -
getMinIngredientCount
private int getMinIngredientCount()
-