Fix stack size of permutations on PositionedStack (#327)

This commit is contained in:
miozune authored and GitHub committed 2022-12-26 19:14:45 +01:00
1 parent 99ec3a4204
commit fb51475bb9
1 file changed
+5 -1
@@ -43,7 +43,11 @@ public class PositionedStack {
if (item.getItemDamage() == Short.MAX_VALUE) {
List<ItemStack> permutations = ItemList.itemMap.get(item.getItem());
if (!permutations.isEmpty()) {
for (ItemStack stack : permutations) stacks.add(stack.copy());
for (ItemStack stack : permutations) {
ItemStack toAdd = stack.copy();
toAdd.stackSize = item.stackSize;
stacks.add(toAdd);
}
} else {
ItemStack base = new ItemStack(item.getItem(), item.stackSize);
base.stackTagCompound = item.stackTagCompound;