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

Glowing outline and spectator GUI use prefix color instead of TeamColor

    Details

    • Confirmation Status:
      Confirmed

      Description

      The bug

      The scoreboard team color is stored in the TeamColor tag and in the Prefix and Suffix tag. The TeamColor is in general used to determine which scoreboard objective should be displayed on the sidebar and which team should get team kills.
      The problem is that the glowing outline and the spectator GUI use the prefix to determine the color while they should use the TeamColor value instead.

      Because Prefix and Suffix tags exists modifying them using NBT editors should not make this report invalid, because otherwise there would not even be a need for these tags.

      How to reproduce

      1. Create a team
        /scoreboard teams add colorTest
        
      2. Leave the world and modify team data in the scoreboard.dat file of the world, with for example NBTExplorer, like this:
        Prefix: "§6"
        TeamColor: "green"
        
      3. Open the world again
      4. Summon for example an armor stand
        /summon armor_stand ~ ~ ~ {Team:"colorTest",CustomName:"Some name",Glowing:1b}
        

        → The armor stand will be glowing orange / gold even though it is in the green team

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The methods net.minecraft.client.gui.spectator.categories.TeleportToTeam.TeamSelectionObject.renderIcon(float, int) and net.minecraft.client.renderer.entity.Render.getTeamColor(T) call net.minecraft.scoreboard.ScorePlayerTeam.getColorPrefix() while they should call net.minecraft.scoreboard.ScorePlayerTeam.getChatFormat().

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dinnerbone [Mojang] Dinnerbone (Nathan Adams)
                Reporter:
                marcono1234 [Helper] Marcono1234
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: