Package net.minecraft.recipe
Class InputSlotFiller<C extends Inventory>
java.lang.Object
net.minecraft.recipe.InputSlotFiller<C>
- All Implemented Interfaces:
RecipeGridAligner<Integer>
public class InputSlotFiller<C extends Inventory> extends Object implements RecipeGridAligner<Integer>
-
Field Summary
Fields Modifier and Type Field Description protected AbstractRecipeScreenHandler<C>craftingScreenHandlerprotected PlayerInventoryinventoryprotected static LoggerLOGGERprotected RecipeFinderrecipeFinder -
Constructor Summary
Constructors Constructor Description InputSlotFiller(AbstractRecipeScreenHandler<C> abstractRecipeScreenHandler) -
Method Summary
Modifier and Type Method Description voidacceptAlignedInput(Iterator<Integer> inputs, int slot, int amount, int gridX, int gridY)private booleancanReturnInputs()protected voidfillInputSlot(Slot slot, ItemStack itemStack)protected voidfillInputSlots(Recipe<C> recipe, boolean craftAll)voidfillInputSlots(ServerPlayerEntity entity, Recipe<C> recipe, boolean craftAll)protected intgetAmountToFill(boolean craftAll, int limit, boolean recipeInCraftingSlots)private intgetFreeInventorySlots()protected voidreturnInputs(boolean bool)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.recipe.RecipeGridAligner
alignRecipeToGrid
-
Field Details
-
LOGGER
-
recipeFinder
-
inventory
-
craftingScreenHandler
-
-
Constructor Details
-
InputSlotFiller
-
-
Method Details
-
fillInputSlots
public void fillInputSlots(ServerPlayerEntity entity, @Nullable Recipe<C> recipe, boolean craftAll) -
returnInputs
protected void returnInputs(boolean bool) -
fillInputSlots
-
acceptAlignedInput
public void acceptAlignedInput(Iterator<Integer> inputs, int slot, int amount, int gridX, int gridY)- Specified by:
acceptAlignedInputin interfaceRecipeGridAligner<C extends Inventory>
-
getAmountToFill
protected int getAmountToFill(boolean craftAll, int limit, boolean recipeInCraftingSlots) -
fillInputSlot
-
canReturnInputs
private boolean canReturnInputs() -
getFreeInventorySlots
private int getFreeInventorySlots()
-