Class DelegateItemUpgradeInventory
java.lang.Object
appeng.util.inv.SupplierInternalInventory<IUpgradeInventory>
appeng.api.implementations.menuobjects.DelegateItemUpgradeInventory
- All Implemented Interfaces:
InternalInventory,ItemTransfer,IUpgradeInventory,Iterable<net.minecraft.world.item.ItemStack>
public final class DelegateItemUpgradeInventory
extends appeng.util.inv.SupplierInternalInventory<IUpgradeInventory>
implements IUpgradeInventory
-
Constructor Summary
ConstructorsConstructorDescriptionDelegateItemUpgradeInventory(Supplier<net.minecraft.world.item.ItemStack> stackSupplier) -
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.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 class appeng.util.inv.SupplierInternalInventory
addItems, addItems, extractItem, getDelegate, getRedstoneSignal, getSlotInv, getSlotLimit, getStackInSlot, getSubInventory, insertItem, isEmpty, isItemValid, iterator, sendChangeNotification, setItemDirect, size, toContainer, toItemHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, spliteratorMethods inherited from interface appeng.api.upgrades.IUpgradeInventory
isInstalled
-
Constructor Details
-
DelegateItemUpgradeInventory
-
-
Method Details
-
getUpgradableItem
public net.minecraft.world.level.ItemLike getUpgradableItem()Description copied from interface:IUpgradeInventoryItem representation of the upgradable object this inventory is managing upgrades for.- Specified by:
getUpgradableItemin interfaceIUpgradeInventory
-
getInstalledUpgrades
public int getInstalledUpgrades(net.minecraft.world.level.ItemLike u) Description copied from interface:IUpgradeInventorydetermine how many of an upgrade are installed.- Specified by:
getInstalledUpgradesin interfaceIUpgradeInventory
-
getMaxInstalled
public int getMaxInstalled(net.minecraft.world.level.ItemLike u) Description copied from interface:IUpgradeInventorydetermine how many of an upgrade can be installed.- Specified by:
getMaxInstalledin interfaceIUpgradeInventory
-
readFromNBT
public void readFromNBT(net.minecraft.nbt.CompoundTag data, String subtag, net.minecraft.core.HolderLookup.Provider registries) Description copied from interface:IUpgradeInventoryReads the contents of this upgrade inventory from a subtag of the given compound tag.- Specified by:
readFromNBTin interfaceIUpgradeInventory
-
writeToNBT
public void writeToNBT(net.minecraft.nbt.CompoundTag data, String subtag, net.minecraft.core.HolderLookup.Provider registries) Description copied from interface:IUpgradeInventoryReads the contents of this upgrade inventory from a subtag of the given compound tag.- Specified by:
writeToNBTin interfaceIUpgradeInventory
-