"Item" descriptions for blocks

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

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