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 pAmount, it.unimi.dsi.fastutil.ints.IntList pStackingIndexList) int
tryPickAll
(int pAmount, it.unimi.dsi.fastutil.ints.IntList pStackingIndexList) 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 pAmount, @Nullable it.unimi.dsi.fastutil.ints.IntList pStackingIndexList) -
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 pAmount, @Nullable it.unimi.dsi.fastutil.ints.IntList pStackingIndexList) -
getMinIngredientCount
private int getMinIngredientCount()
-