Multi-Stack Item Collection
The MultiStackItemCollection permits the storage of a single item across multiple item stacks within the same collection.
The collection exhibits the following characteristics:
- It allows a stackable (non-unique) item to be distributed across multiple item stacks. For instance, if the maximum capacity for a stack of "apples" is 100, adding 101 apples to the collection will result in two stacks—one containing 100 apples and the other containing just 1.
- When an item is split across multiple stacks, each stack references the same item instance.
Default Settings
Its primary settings are as follows:
- DefaultStackSizeLimit: If an item instance lacks a StackSizeLimitAttribute, this value will be used as the maximum allowable quantity within an item stack.
- StackSizeLimitAttribute: An item attribute that determines the maximum stack capacity for an item. (This must be an integer attribute.)
API
This collection extends ItemCollection and overrides its internal logic, while maintaining the same API as ItemCollection.
