mojira.dev
MC-111729

Read-only scoreboard objectives only initialize when respective value is changed

The bug

Read-only scoreboard objectives are only initialized when the value they are tracking changes. Expected would be that they initialize on creation.

Affected objective criteria

  • air

  • armor

  • food

  • health

  • level

  • xp

How to reproduce

  1. Create a scoreboard objective of the type xp

    /scoreboard objectives add xp xp
  2. Check if a value is set by displaying the objective on the sidebar or trying to get the score

    /scoreboard objectives setdisplay sidebar xp
    /scoreboard players get @s xp

    → ❌ No value is set

  3. Update your xp points

    /xp add @s 1
  4. Repeat step 2
    → ✔ Now a value is set

Linked issues

Attachments

Comments 15

Pretty sure there was already a report about that but I can't find it right now.

Can confirm in 20w51a.

Can confirm in 21w03a.

Can confirm in 21w05b.

Can confirm in 21w06a.

5 more comments

Can confirm in 1.18.1.

Can confirm in 1.18.2.

Can confirm in 1.19.

Can confirm in 1.19.2.

Can confirm in 1.21 Pre-Release 2.

chokoboy3

(Unassigned)

Confirmed

Platform

Normal

Commands

/scoreboard-objectives, health, read-only-scoreboard-objectives, scoreboard

Minecraft 1.11.2, Minecraft 17w47b, Minecraft 17w48a, Minecraft 17w49b, Minecraft 17w50a, ..., 1.19.1 Release Candidate 1, 1.19.2, 1.20.1, 1.20.5 Release Candidate 2, 1.21 Pre-Release 2

Retrieved