Skip to content

Commit

Permalink
fix inventory conversion typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 21, 2020
1 parent 43e462d commit f3ac3ef
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -98,7 +98,7 @@ public static AbstractMap.SimpleEntry<Integer, InventoryTag> getInventory(Argume
else if (arg.matchesArgumentList(ItemTag.class)) {
List<ItemTag> list = ListTag.valueOf(string, scriptEntry.getContext()).filter(ItemTag.class, scriptEntry);
ItemStack[] items = convertItems(list).toArray(new ItemStack[list.size()]);
InventoryTag inventory = new InventoryTag(Math.max(InventoryTag.maxSlots, (items.length / 9) * 9 + 9));
InventoryTag inventory = new InventoryTag(Math.min(InventoryTag.maxSlots, (items.length / 9) * 9 + 9));
inventory.setContents(items);
return new AbstractMap.SimpleEntry<>(items.length, inventory);
}
Expand Down

0 comments on commit f3ac3ef

Please sign in to comment.