-
Notifications
You must be signed in to change notification settings - Fork 12
Item Inv Management
AlexIIL edited this page Mar 28, 2019
·
1 revision
Everything in the "alexiil.mc.lib.attributes.item" package is dedicated to item management, and is intended for any mod to use.
The core API's are:
- FixedItemInv* (A version of minecraft's Inventory class that only deals with indexed item slot accessors and modification).
- FixedItemInvView* (A read-only version of FixedItemInv).
- ItemInvStats* (containing statistics for any inventory).
- ItemInsertable* (containing item insertion)
- ItemExtractable* (containing item extraction)
- ItemFilter (a Predicate for ItemStacks)
- ItemInvSlotChangeListener (for listening to changes in a FixedItemInvView - although not all implementations will support this).
(*Is an attribute by default)
In addition there are various utility classes:
- ItemAttributes (containing all of the item attributes)
- ItemInvUtil (for accessing attribute versions of the above API's, and a "move" method for moving items from an IItemExtractable to an IItemInsertable).
- ItemStackUtil (containing general methods around single ItemStack instances that were needed to create this API).
- ItemStackCollections (utility methods for creating Sets and Maps that compare ItemStack's correctly (as ItemStack itself doesn't override equals() or hashCode()).
The "impl" subpackage is also for public use, and it contains a lot of concrete implementations for the core API's.