"Item" descriptions for blocks

Submitted by Yanis48 on Thu, 08/09/2018 - 11:28
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

Submitted by Klemen on Thu, 08/09/2018 - 12:42

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.

Submitted by Klemen on Fri, 11/02/2018 - 19:10

This feature will be added in 1.8.1, I am closing this ticket.