public class InputSlotFiller<C extends Inventory> extends Object implements RecipeGridAligner<Integer>
Modifier and Type | Field and Description |
---|---|
protected AbstractRecipeScreenHandler<C> |
craftingScreenHandler |
protected PlayerInventory |
inventory |
protected static Logger |
LOGGER |
protected RecipeFinder |
recipeFinder |
Constructor and Description |
---|
InputSlotFiller(AbstractRecipeScreenHandler<C> abstractRecipeScreenHandler) |
Modifier and Type | Method and 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
alignRecipeToGrid
protected static final Logger LOGGER
protected final RecipeFinder recipeFinder
protected PlayerInventory inventory
protected AbstractRecipeScreenHandler<C extends Inventory> craftingScreenHandler
public InputSlotFiller(AbstractRecipeScreenHandler<C> abstractRecipeScreenHandler)
public void fillInputSlots(ServerPlayerEntity entity, @Nullable Recipe<C> recipe, boolean craftAll)
protected void returnInputs()
protected void returnSlot(int int2)
public void acceptAlignedInput(Iterator<Integer> inputs, int slot, int amount, int gridX, int gridY)
acceptAlignedInput
in interface RecipeGridAligner<Integer>
protected int getAmountToFill(boolean craftAll, int limit, boolean recipeInCraftingSlots)
private boolean canReturnInputs()
private int getFreeInventorySlots()