mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-08 12:34:46 +00:00
Fix Repair Handler with broken ItemStack (#910)
This commit is contained in:
1 parent
eb58e1dabc
commit
d25365942a
1 file changed
+8
-4
@@ -120,10 +120,14 @@ public class RepairRecipeHandler extends TemplateRecipeHandler {
|
||||
final List<ItemStack> permutations = new ArrayList<>();
|
||||
|
||||
for (ItemStack itemstack2 : ItemList.items) {
|
||||
if (itemstack1.getItem().getIsRepairable(itemstack1, itemstack2)) {
|
||||
final ItemStack right = itemstack2.copy();
|
||||
right.stackSize = 4;
|
||||
permutations.add(right);
|
||||
try {
|
||||
if (itemstack1.getItem().getIsRepairable(itemstack1, itemstack2)) {
|
||||
final ItemStack right = itemstack2.copy();
|
||||
right.stackSize = 4;
|
||||
permutations.add(right);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Catch exceptions from mods that don't properly implement getIsRepairable
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user