mojira.dev
MC-136261

Scoreboard criterion killedByTeam.<color> does not increase when killed by a mob in a team of the corresponding color

The bug:

When a mob in a colored team kills a player, the corresponding killedByTeam.'color' doesn't increase.

How to reproduce:

  1. Create a team with a color by executing the following commands:

    /team add red
    /team modify red color red
  2. Create a scoreboard objective that increments when someone on that team kills the player:

    /scoreboard objectives add killedbyteam killedByTeam.blue
    /scoreboard objectives setdisplay sidebar killedbyteam
  3. Summon a mob on that team:

    /summon minecraft:husk ~ ~ ~ {Team:"red"}
  4. Let the mob kill you.

Expected result:

The scoreboard objective would increase.

Observed result:

The scoreboard objective did not increase, even though a mob from the colored team killed the player.

Original description

So I was messing with commands and scoreboards and teams I made a scoreboard to check if a player has been killed by a team I used the red color and set the teams color to red and It didn't work I spent about half a hour trying to get it to work

Comments 6

The criteria you used was killedByTeam.red, correct? Also, did you set the team color to red and add the proper players to the team?

I was trying this with mobs so

I was trying this with mobs so

Also I forgot to do the summary 

Also I forgot to do the summary 

Can confirm in 20w16a. When a mob in a colored team kills a player, the corresponding killedByTeam.'color' doesn't increase.

Tested it in singleplayer, with zombie.

Sawyer

(Unassigned)

Confirmed

Commands

Minecraft 1.13, 20w16a, 1.21.1, 24w38a

Retrieved