Package appeng.api.inventories
Interface ItemTransfer
- All Known Subinterfaces:
InternalInventory,IUpgradeInventory
- All Known Implementing Classes:
BaseInternalInventory,DelegateItemUpgradeInventory,PlatformInventoryWrapper,appeng.util.inv.SupplierInternalInventory
public interface ItemTransfer
Models item transfer that lets the target inventory handle where items are placed into or extracted from.
-
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.world.item.ItemStackaddItems(net.minecraft.world.item.ItemStack stack) Attempts to insert as much of the given item into this inventory as possible.net.minecraft.world.item.ItemStackaddItems(net.minecraft.world.item.ItemStack stack, boolean simulate) Attempts to insert as much of the given item into this inventory as possible.net.minecraft.world.item.ItemStackremoveItems(int amount, net.minecraft.world.item.ItemStack filter, @Nullable Predicate<net.minecraft.world.item.ItemStack> destination) net.minecraft.world.item.ItemStackremoveSimilarItems(int amount, net.minecraft.world.item.ItemStack filter, FuzzyMode fuzzyMode, Predicate<net.minecraft.world.item.ItemStack> destination) For fuzzy extract, we will only ever extract one slot, since we're afraid of merging two item stacks with different damage values.default net.minecraft.world.item.ItemStacksimulateAdd(net.minecraft.world.item.ItemStack stack) net.minecraft.world.item.ItemStacksimulateRemove(int amount, net.minecraft.world.item.ItemStack filter, Predicate<net.minecraft.world.item.ItemStack> destination) net.minecraft.world.item.ItemStacksimulateSimilarRemove(int amount, net.minecraft.world.item.ItemStack filter, FuzzyMode fuzzyMode, Predicate<net.minecraft.world.item.ItemStack> destination)
-
Method Details
-
removeItems
net.minecraft.world.item.ItemStack removeItems(int amount, net.minecraft.world.item.ItemStack filter, @Nullable @Nullable Predicate<net.minecraft.world.item.ItemStack> destination) -
simulateRemove
net.minecraft.world.item.ItemStack simulateRemove(int amount, net.minecraft.world.item.ItemStack filter, Predicate<net.minecraft.world.item.ItemStack> destination) -
removeSimilarItems
net.minecraft.world.item.ItemStack removeSimilarItems(int amount, net.minecraft.world.item.ItemStack filter, FuzzyMode fuzzyMode, Predicate<net.minecraft.world.item.ItemStack> destination) For fuzzy extract, we will only ever extract one slot, since we're afraid of merging two item stacks with different damage values. -
simulateSimilarRemove
-
addItems
default net.minecraft.world.item.ItemStack addItems(net.minecraft.world.item.ItemStack stack) Attempts to insert as much of the given item into this inventory as possible.- Parameters:
stack- The stack to insert. Will not be mutated.- Returns:
- The overflow, which can be the same object as stack.
-
simulateAdd
default net.minecraft.world.item.ItemStack simulateAdd(net.minecraft.world.item.ItemStack stack) -
addItems
net.minecraft.world.item.ItemStack addItems(net.minecraft.world.item.ItemStack stack, boolean simulate) Attempts to insert as much of the given item into this inventory as possible.- Parameters:
stack- The stack to insert. Will not be mutated.- Returns:
- The overflow, which can be the same object as stack.
-