Guard against IOOBEs when rendering the new spell trade icon, fixes #565
This commit is contained in:
@@ -90,6 +90,8 @@ public class WizardTradeTweaksHandler {
|
||||
// New spell indicator
|
||||
if(gui.inventorySlots instanceof ContainerMerchant){
|
||||
|
||||
if(tradeIndex < trades.size()){ // Seems to happen with certain mods' GUIs
|
||||
|
||||
// Can't use getCurrentRecipe because that only gets updated when the correct items are given
|
||||
MerchantRecipe recipe = trades.get(tradeIndex);
|
||||
|
||||
@@ -125,5 +127,6 @@ public class WizardTradeTweaksHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user