Class LargeInventory

java.lang.Object
org.cyclops.cyclopscore.inventory.SimpleInventory
org.cyclops.cyclopscore.inventory.LargeInventory
All Implemented Interfaces:
net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.WorldlyContainer, INBTInventory, INBTSerializable
Direct Known Subclasses:
IndexedInventory

public class LargeInventory extends SimpleInventory
A large inventory implementation.
  • Constructor Details

    • LargeInventory

      public LargeInventory()
      Default constructor for NBT persistence, don't call this yourself.
    • LargeInventory

      public LargeInventory(int size, int stackLimit)
      Make a new instance.
      Parameters:
      size - The amount of slots in the inventory.
      stackLimit - The stack limit for each slot.
  • Method Details

    • readFromNBT

      public void readFromNBT(net.minecraft.nbt.CompoundTag data, String tag)
      Read inventory data from the given NBT.
      Overrides:
      readFromNBT in class SimpleInventory
      Parameters:
      data - The NBT data containing inventory data.
      tag - The NBT tag name where the info is located.
    • writeToNBT

      public void writeToNBT(net.minecraft.nbt.CompoundTag data, String tag)
      Write inventory data to the given NBT.
      Overrides:
      writeToNBT in class SimpleInventory
      Parameters:
      data - The NBT tag that will receive inventory data.
      tag - The NBT tag name where the info must be located.