"Item" descriptions for blocks

Published by Yanis48 on
Status
Fixed
Issue description

It would be nice to be able to have descriptions for blocks (when they are items in the inventory).

It is possible to implement that in the exact same way as for item descriptions:

@Override
	public void addInformation(ItemStack itemstack, World world, List<String> tooltip, ITooltipFlag flagIn)
	{
		tooltip.add("");
	}

 

Another idea (maybe I should open a separate ticket) is to allow translation strings in these descriptions, which could be done with:

import net.minecraft.client.resources.I18n;

@Override
	public void addInformation(ItemStack itemstack, World world, List<String> tooltip, ITooltipFlag flagIn)
	{
		tooltip.add(I18n.format("foo.bar.example"));
	}

 

Issue comments

Thank you for this information. We will indeed add support for this, but most likely not in 1.8.0, as the feature queue is already close.