@FunctionalInterface
public interface StackInsertionFunction
Modifier and Type | Interface and Description |
---|---|
static class |
StackInsertionFunction.InsertionResult
The result of an attempted insertion.
|
Modifier and Type | Method and Description |
---|---|
static StackInsertionFunction |
getDefaultInserter()
Gets a stack insertion function that will insert up to full stacks into a given slot.
|
static StackInsertionFunction |
getInsertionFunction(int maxStackSize)
Gets a stack insertion function that will insert items up to a given stack size.
|
StackInsertionFunction.InsertionResult |
modifyForInsertion(int slot,
net.minecraft.item.ItemStack addingTo,
net.minecraft.item.ItemStack toInsert) |
@Nonnull StackInsertionFunction.InsertionResult modifyForInsertion(int slot, @Nonnull net.minecraft.item.ItemStack addingTo, @Nonnull net.minecraft.item.ItemStack toInsert)
addingTo
- The existing stack. Modifications are lost.toInsert
- The stacks to insert. Modifications are lost.static StackInsertionFunction getInsertionFunction(int maxStackSize)
static StackInsertionFunction getDefaultInserter()
getInsertionFunction(int)
with an argument of Integer.MAX_VALUE
.