Items don't show their name in custom GUI

Issue description

When holding an item (or a block, tool, armor, etc.) when a custom GUI is opened (a GUI with inventory) it doesn't show up its name.

Issue comments

Submitted by Klemen on Tue, 06/19/2018 - 09:52

Thank you for your bug report!

Adding the following code in the Container class of the GUI fixes this bug:

@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
	this.drawDefaultBackground();
	super.drawScreen(mouseX, mouseY, partialTicks);
	this.renderHoveredToolTip(mouseX, mouseY);
}

This will be added in the code automatically from 1.8.0 on.

Submitted by Klemen on Tue, 06/19/2018 - 09:53

I have added this code, issue fixed and added to the changelog.

Submitted by Klemen on Tue, 06/19/2018 - 09:54

For users that would like to do this manually, you need to put the code I provided above the method called "drawGuiContainerBackgroundLayer". You can use code editor and search to find the proper location inside the code of your custom GUI.