Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-80110

Villager item count graphical bug

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 19w41a
    • Minecraft 1.8.4, Minecraft 15w44b, Minecraft 1.9.3 Pre-Release 1, Minecraft 16w32b, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 3, Minecraft 1.14.3 Pre-Release 4, 1.15.1, 1.17.1
    • Confirmed
    • UI
    • Low
    • Platform

      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.

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            9 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: