mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-21 20:42:26 +00:00
Fix NPE on ItemEdible tooltip if the item is undefined
This commit is contained in:
1 parent
0d193ec907
commit
385ef0153e
1 file changed
+3
-2
@@ -122,8 +122,9 @@ public class ItemEdible extends ItemFood {
|
||||
dynamic.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
|
||||
// effect info
|
||||
if(displayEffectsTooltip) {
|
||||
for(PotionEffect potionEffect : potionEffects.get(stack.getMetadata())) {
|
||||
int meta = stack.getMetadata();
|
||||
if(dynamic.isValid(meta) && displayEffectsTooltip) {
|
||||
for(PotionEffect potionEffect : potionEffects.get(meta)) {
|
||||
tooltip.add(I18n.translateToLocal(potionEffect.getEffectName()).trim());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user