Interface IUpgradeInventory

All Superinterfaces:
InternalInventory, ItemTransfer, Iterable<net.minecraft.world.item.ItemStack>
All Known Implementing Classes:
DelegateItemUpgradeInventory

public interface IUpgradeInventory extends InternalInventory
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 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.