Fixed a crash when the Black Hole Talisman is used on lit redstone ore. Closes #1320

This commit is contained in:
Vasco Lavos committed 2015-08-30 22:38:17 +01:00
1 parent b7cb0e313e
commit 46914d2a8b
1 file changed
+3 -1
@@ -190,7 +190,9 @@ public class ItemBlackHoleTalisman extends ItemMod implements IBlockProvider {
public String getItemStackDisplayName(ItemStack par1ItemStack) {
Block block = getBlock(par1ItemStack);
int meta = getBlockMeta(par1ItemStack);
return super.getItemStackDisplayName(par1ItemStack) + (block == null ? "" : " (" + EnumChatFormatting.GREEN + new ItemStack(block, 1, meta).getDisplayName() + EnumChatFormatting.RESET + ")");
ItemStack stack = new ItemStack(block, 1, meta);
return super.getItemStackDisplayName(par1ItemStack) + ((stack == null || stack.getItem() == null) ? "" : " (" + EnumChatFormatting.GREEN + stack.getDisplayName() + EnumChatFormatting.RESET + ")");
}
@Override