if (tempContents[s] == null) emptySlots++;
if (emptySlots <= data.getFreeSlots()) return;
for (ItemStack stack : data.getContents().getItems()) {
ItemIdentifier item = new ItemIdentifier(stack);
MapData itemData = getMapData(item);
int count = (stack.stackSize - itemData.itemCount);
if (count <= 0) continue;
setItemsInSlot(slot, item, itemData, count);