Added null check for Vaygrim

This commit is contained in:
Aidan Brady 2014-01-16 21:41:14 -05:00
parent fedb728709
commit 44ae2e8606

View file

@ -67,6 +67,11 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp
@Override
public String getUnlocalizedName(ItemStack itemstack)
{
if(GeneratorType.getFromMetadata(itemstack.getItemDamage()) == null)
{
return "KillMe!";
}
return getUnlocalizedName() + "." + GeneratorType.getFromMetadata(itemstack.getItemDamage()).name;
}