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 TypeMethodDescriptionint
getInstalledUpgrades
(net.minecraft.world.level.ItemLike u) determine how many of an upgrade are installed.int
getMaxInstalled
(net.minecraft.world.level.ItemLike u) determine how many of an upgrade can be installed.net.minecraft.world.level.ItemLike
Item representation of the upgradable object this inventory is managing upgrades for.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.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.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, toItemHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, toItemHandler
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods 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:IUpgradeInventory
Item representation of the upgradable object this inventory is managing upgrades for.- Specified by:
getUpgradableItem
in interfaceIUpgradeInventory
-
getInstalledUpgrades
public int getInstalledUpgrades(net.minecraft.world.level.ItemLike u) Description copied from interface:IUpgradeInventory
determine how many of an upgrade are installed.- Specified by:
getInstalledUpgrades
in interfaceIUpgradeInventory
-
getMaxInstalled
public int getMaxInstalled(net.minecraft.world.level.ItemLike u) Description copied from interface:IUpgradeInventory
determine how many of an upgrade can be installed.- Specified by:
getMaxInstalled
in interfaceIUpgradeInventory
-
readFromNBT
public void readFromNBT(net.minecraft.nbt.CompoundTag data, String subtag, net.minecraft.core.HolderLookup.Provider registries) Description copied from interface:IUpgradeInventory
Reads the contents of this upgrade inventory from a subtag of the given compound tag.- Specified by:
readFromNBT
in interfaceIUpgradeInventory
-
writeToNBT
public void writeToNBT(net.minecraft.nbt.CompoundTag data, String subtag, net.minecraft.core.HolderLookup.Provider registries) Description copied from interface:IUpgradeInventory
Reads the contents of this upgrade inventory from a subtag of the given compound tag.- Specified by:
writeToNBT
in interfaceIUpgradeInventory
-