mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 20:22:17 +00:00
Add try/catch around item.getSubItems in creative tab subset loading
This commit is contained in:
1 parent
fbcd6692ed
commit
e99febf27c
1 file changed
+9
-4
@@ -364,10 +364,15 @@ public class ItemInfo
|
||||
ItemStackSet set = creativeTabRanges.get(itemTab.getTabIndex());
|
||||
if (set == null)
|
||||
creativeTabRanges.set(itemTab.getTabIndex(), set = new ItemStackSet());
|
||||
stackList.clear();
|
||||
item.getSubItems(item, itemTab, stackList);
|
||||
for(ItemStack stack : stackList)
|
||||
set.add(stack);
|
||||
|
||||
try {
|
||||
stackList.clear();
|
||||
item.getSubItems(item, itemTab, stackList);
|
||||
for(ItemStack stack : stackList)
|
||||
set.add(stack);
|
||||
} catch (Exception e) {
|
||||
NEIClientConfig.logger.error("Error loading sub-items for: "+item+". Tab: "+itemTab.getTabLabel(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user