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

hoverEvent changes lighting for displayed block of minecart and end crystal

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 19w40a
    • Minecraft 15w41b, Minecraft 15w46a, Minecraft 15w47c, Minecraft 15w50a, Minecraft 16w04a, Minecraft 1.9.2, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.10.2, Minecraft 16w39b, Minecraft 16w39c, Minecraft 1.11, Minecraft 1.12, Minecraft 1.12.1, Minecraft 18w11a
    • Confirmed
    • (Unassigned)

      The bug

      It seems that whenever the game shows the text of an hoverEvent (caused by /tellraw, hovering over an item in the inventory...) it changes the lighting of entities.

      Affected entities

      • Displayed block of minecarts (darkens)
      • Ender crystal (brightens)

      How to reproduce

      1. Place a minecart displaying a block:
        Example command
        /summon minecart ~ ~1 ~ {DisplayTile:"minecraft:quartz_block",CustomDisplayTile:1b,DisplayOffset:16}
        
      2. Stand in front of it (South direction; +Z) and look at it (looking North; -Z)
      3. Use the following command and hover over the text:
        Example command
        /tellraw @a {"text":"","extra":[{"text":"Hover over this text","color":"white","hoverEvent":{"action":"show_text","value":"You are hovering over this text"}}]}
        

        → You should see that the block being displayed darkens when you are hovering over the message.

      Code analysis

      The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.

      It looks like the method net.minecraft.client.gui.GuiScreen.drawHoveringText(List<String>, int, int) which calls the method net.minecraft.client.renderer.GlStateManager.enableRescaleNormal() is causing this.

        1. 2015-11-08_11.00.57.png
          2015-11-08_11.00.57.png
          232 kB
        2. 2015-11-08_11.01.05.png
          2015-11-08_11.01.05.png
          233 kB
        3. 2015-11-13_21.12.32.png
          2015-11-13_21.12.32.png
          344 kB
        4. 2015-11-13_21.12.36.png
          2015-11-13_21.12.36.png
          341 kB
        5. 2015-11-13_21.57.39.png
          2015-11-13_21.57.39.png
          502 kB
        6. 2015-11-13_21.57.42.png
          2015-11-13_21.57.42.png
          498 kB
        7. 2019-10-03_00.54.49.png
          2019-10-03_00.54.49.png
          342 kB
        8. Lighting glitch minecart hover event (15w41b).mp4
          789 kB

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            8 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: