Skip to content

Represent Inventories as a slot-entity map

Fingercomp requested to merge fix/inventory-slots into master

Previously inventories stored their contents as a list of entities. This proved to be a mistake (see ocelot-desktop#27 (closed)). This MR reimplements the Inventory trait as a bidirectional map of slot indices to entities.

The NBT save format has been affected by the changes. Both the old, slotless, format and the new format can be loaded; when saving, however, only the new format is available.

Merge request reports