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
A large inventory implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cyclops.cyclopscore.persist.nbt.INBTSerializable
INBTSerializable.SelfNBTClassType
-
Field Summary
Fields inherited from class org.cyclops.cyclopscore.inventory.SimpleInventory
contents
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
-
Constructor Summary
ConstructorDescriptionDefault constructor for NBT persistence, don't call this yourself.LargeInventory
(int size, int stackLimit) Make a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
readFromNBT
(net.minecraft.nbt.CompoundTag data, String tag) Read inventory data from the given NBT.void
writeToNBT
(net.minecraft.nbt.CompoundTag data, String tag) Write inventory data to the given NBT.Methods inherited from class org.cyclops.cyclopscore.inventory.SimpleInventory
addDirtyMarkListener, canPlaceItem, canPlaceItemThroughFace, canTakeItemThroughFace, clearContent, fromNBT, getContainerSize, getItem, getItemHandler, getItemHandlerSided, getItemStacks, getMaxStackSize, getSlotsForFace, getState, isEmpty, onInventoryChanged, read, removeDirtyMarkListener, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpen, toNBT, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, hasAnyMatching, hasAnyOf
-
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
Read inventory data from the given NBT.- Overrides:
readFromNBT
in classSimpleInventory
- Parameters:
data
- The NBT data containing inventory data.tag
- The NBT tag name where the info is located.
-
writeToNBT
Write inventory data to the given NBT.- Overrides:
writeToNBT
in classSimpleInventory
- Parameters:
data
- The NBT tag that will receive inventory data.tag
- The NBT tag name where the info must be located.
-