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

Querying Player XP Score to Scoreboard

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.14.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Win10 and newest Java Version
    • Confirmation Status:
      Unconfirmed

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: