类 StackedContents.RecipePicker
java.lang.Object
net.minecraft.world.entity.player.StackedContents.RecipePicker
- 封闭类:
- StackedContents
-
字段概要
字段修饰符和类型字段说明private 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<?>
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private 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)
-
字段详细资料
-
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
-
-
构造器详细资料
-
RecipePicker
-
-
方法详细资料
-
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()
-