The bug
When you move an item from your inventory in the trading menu of a villager to a spot where an item is displayed:
The count of the displayed item gets displayed in front of your item
The count of your item get displayed behind the displayed item
The reason
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The reason for this is that the method net.minecraft.client.renderer.RenderItem.renderItemOverlayIntoGUI(FontRenderer, ItemStack, int, int, String)
always disables depth before drawing the item count. This way it is always drawn "on top" of everything. The problem is that GUIs that extend GuiContainer
always draw after the container itself is drawn. As the GuiContainer
class also draws the item picked up with the mouse, the item count drawn by the villager GUI is on top of it.
This could (and maybe should) be solved by having the method net.minecraft.client.renderer.RenderItem.renderItemOverlayIntoGUI(FontRenderer, ItemStack, int, int, String)
use like it is done for drawing the items use a z-level as well to determine the depth.
Linked issues
is duplicated by 4
relates to 1
Attachments
Comments 4
Relates to MC-145869
Can partially reproduce in 1.17.1. The red line caused by discounts renders on top of the held item.
This issue was fixed in 19w41a, along with [MC-121942]. The issue described by @unknown is a different one.
Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.
This is an automated comment on any open or reopened issue with out-of-date affected versions.