Package net.minecraft.recipe
Class InputSlotFiller<C extends Inventory>
java.lang.Object
net.minecraft.recipe.InputSlotFiller<C>
- All Implemented Interfaces:
RecipeGridAligner<Integer>
- Direct Known Subclasses:
FurnaceInputSlotFiller
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()protected voidreturnSlot(int int2)
-
Field Details
-
Constructor Details
-
Method Details
-
fillInputSlots
public void fillInputSlots(ServerPlayerEntity entity, @Nullable Recipe<C> recipe, boolean craftAll) -
returnInputs
protected void returnInputs() -
returnSlot
protected void returnSlot(int int2) -
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()
-