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

Querying Player XP Score to Scoreboard

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.14.3
    • None
    • Win10 and newest Java Version
    • Unconfirmed

      I'm trying to query a players XpScore with a CmdBlock but it does not update. I'm using the following cmd in a repeating CmdBlock with no Redstone need:

      execute as @a at @s store result score @s curxp run data get entity @s XpTotal

      What I expected to happen was...:
      I wanted a constant update of the players Xp amount in the scoreboard curxp (which is type dummy). Whenever the user gets more Xp or dies (which causes the loss of all Xp points) the scoreboard updates. This should also happen if s.o. uses his/her levels to combine an enchanted book with a sword or s.th. but...

      What actually happened was...:
      ... whenever the user does this, the old Xp amount (from before combining these items) stays in the scoreboard. This just happens by losing Xp through crafting, not by dying.

      Steps to Reproduce:
      1. Type following command in chat:

      /scoreboard objectives add curxp dummy

      2. Create CmdBlock with following cmd...

      execute as @a at @s store result score @s curxp run data get entity @s XpTotal

      ... and following properties:

      • repeating
      • unconditional
      • always active

      3. Use anvil to combine item with enchantment book

        1. 2019-07-15_04.06.26.png
          717 kB
          Alexander Funke
        2. 2019-07-15_04.06.34.png
          752 kB
          Alexander Funke
        3. 2019-07-15_04.14.43.png
          597 kB
          Alexander Funke

            Unassigned Unassigned
            the9ty9 Alexander Funke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: