public void loadFrom(CompoundTag parent, String key) {
        // Check if list-format tags are present
        ListTag itemList = parent.getList(key, 10);
        if (!itemList.isEmpty()) {
            fromTag(itemList);
            ProjectRedCore.LOGGER.warn("Inventory {} loaded from non-ordered data. Its contents may have shuffled", this);
        } else {
            // Otherwise, use new compound format
            load(parent.getCompound(key));
        }
    }
Simple extension of default vanilla Inventory class that allows for proper saving and loading
to a CompoundNBT. Default implementation does not load items back into their original slots.
<p>
Use {@link BaseContainer#save} and {@link BaseContainer#load} instead of Inventory#createTag and Inventory#fromTag
core/src/main/java/mrtjp/projectred/core/inventory/BaseContainer.java