Fixed crash when autocompleting Ender IO recipes from JEI, fixes #1735
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
- Fixed Disk Manipulator not extracting items (ineternet)
|
||||
- Fixed filter slots not caring about max stack size (raoulvdberge)
|
||||
- Fixed model warning about Portable Grid (raoulvdberge)
|
||||
- Fixed crash when autocompleting Ender IO recipes from JEI (raoulvdberge)
|
||||
- Fixed Grid not always using all combinations when using JEI autocompletion (raoulvdberge)
|
||||
- Increased Grid performance (raoulvdberge)
|
||||
- Various internal refactors (raoulvdberge)
|
||||
|
||||
|
@@ -60,19 +60,19 @@ public class RecipeTransferHandlerGrid implements IRecipeTransferHandler {
|
||||
IGuiIngredient<ItemStack> ingredient = inputs.get(slot.getSlotIndex() + 1);
|
||||
|
||||
if (ingredient != null) {
|
||||
List<ItemStack> possibleItems = ingredient.getAllIngredients();
|
||||
|
||||
NBTTagList tags = new NBTTagList();
|
||||
|
||||
for (int i = 0; i < possibleItems.size(); ++i) {
|
||||
if (i >= 5) {
|
||||
break; // Max 5 possible items to avoid reaching max network packet size
|
||||
}
|
||||
for (ItemStack possibleItem : ingredient.getAllIngredients()) {
|
||||
if (possibleItem != null) {
|
||||
possibleItem = possibleItem.copy();
|
||||
possibleItem.setTagCompound(possibleItem.getItem().getNBTShareTag(possibleItem));
|
||||
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
possibleItems.get(i).writeToNBT(tag);
|
||||
possibleItem.writeToNBT(tag);
|
||||
|
||||
tags.appendTag(tag);
|
||||
}
|
||||
}
|
||||
|
||||
recipe.setTag("#" + slot.getSlotIndex(), tags);
|
||||
}
|
||||
|
Reference in New Issue
Block a user