Package appeng.api.upgrades
Interface IUpgradeInventory
- All Superinterfaces:
InternalInventory,ItemTransfer,Iterable<net.minecraft.world.item.ItemStack>
- All Known Implementing Classes:
DelegateItemUpgradeInventory
This specialized inventory can be used to insert and extract upgrade cards into AE2 machines. Only upgrades supported
by the machine can be inserted.
-
Method Summary
Modifier and TypeMethodDescriptionintgetInstalledUpgrades(net.minecraft.world.level.ItemLike u) determine how many of an upgrade are installed.intgetMaxInstalled(net.minecraft.world.level.ItemLike u) determine how many of an upgrade can be installed.net.minecraft.world.level.ItemLikeItem representation of the upgradable object this inventory is managing upgrades for.default booleanisInstalled(net.minecraft.world.level.ItemLike upgradeCard) voidreadFromNBT(net.minecraft.nbt.CompoundTag data, String subtag, net.minecraft.core.HolderLookup.Provider registries) Reads the contents of this upgrade inventory from a subtag of the given compound tag.voidwriteToNBT(net.minecraft.nbt.CompoundTag data, String subtag, net.minecraft.core.HolderLookup.Provider registries) Reads the contents of this upgrade inventory from a subtag of the given compound tag.Methods inherited from interface appeng.api.inventories.InternalInventory
addItems, addItems, clear, extractItem, getRedstoneSignal, getSlotInv, getSlotLimit, getStackInSlot, getSubInventory, insertItem, isEmpty, isItemValid, iterator, removeItems, removeSimilarItems, sendChangeNotification, setItemDirect, simulateAdd, simulateRemove, simulateSimilarRemove, size, toContainer, toItemHandlerMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getUpgradableItem
net.minecraft.world.level.ItemLike getUpgradableItem()Item representation of the upgradable object this inventory is managing upgrades for. -
isInstalled
default boolean isInstalled(net.minecraft.world.level.ItemLike upgradeCard) - Returns:
- Checks if the given upgrade card is installed in this inventory.
-
getInstalledUpgrades
int getInstalledUpgrades(net.minecraft.world.level.ItemLike u) determine how many of an upgrade are installed. -
getMaxInstalled
int getMaxInstalled(net.minecraft.world.level.ItemLike u) determine how many of an upgrade can be installed. -
readFromNBT
void readFromNBT(net.minecraft.nbt.CompoundTag data, String subtag, net.minecraft.core.HolderLookup.Provider registries) Reads the contents of this upgrade inventory from a subtag of the given compound tag. -
writeToNBT
void writeToNBT(net.minecraft.nbt.CompoundTag data, String subtag, net.minecraft.core.HolderLookup.Provider registries) Reads the contents of this upgrade inventory from a subtag of the given compound tag.
-