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>
craftingScreenHandler
protected PlayerInventory
inventory
protected static Logger
LOGGER
protected RecipeFinder
recipeFinder
-
Constructor Summary
Constructors Constructor Description InputSlotFiller(AbstractRecipeScreenHandler<C> abstractRecipeScreenHandler)
-
Method Summary
Modifier and Type Method Description void
acceptAlignedInput(Iterator<Integer> inputs, int slot, int amount, int gridX, int gridY)
private boolean
canReturnInputs()
protected void
fillInputSlot(Slot slot, ItemStack itemStack)
protected void
fillInputSlots(Recipe<C> recipe, boolean craftAll)
void
fillInputSlots(ServerPlayerEntity entity, Recipe<C> recipe, boolean craftAll)
protected int
getAmountToFill(boolean craftAll, int limit, boolean recipeInCraftingSlots)
private int
getFreeInventorySlots()
protected void
returnInputs()
protected void
returnSlot(int int2)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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() -
returnSlot
protected void returnSlot(int int2) -
fillInputSlots
-
acceptAlignedInput
public void acceptAlignedInput(Iterator<Integer> inputs, int slot, int amount, int gridX, int gridY)- Specified by:
acceptAlignedInput
in interfaceRecipeGridAligner<C extends Inventory>
-
getAmountToFill
protected int getAmountToFill(boolean craftAll, int limit, boolean recipeInCraftingSlots) -
fillInputSlot
-
canReturnInputs
private boolean canReturnInputs() -
getFreeInventorySlots
private int getFreeInventorySlots()
-