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

Client attribute values may desync from the server after leaving the end

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w20a
    • 1.20.4
    • None
    • Confirmed
    • (Unassigned)

      Executing the following series of steps will cause the client's attribute values to desync from the server (while not wearing any armor):

      1. run /attribute <player> minecraft:generic.armor base set 10
      2. Travel from The End to the Overworld via end portal
      3. Observe that 10 armor points are displayed on the client.
      4. Run /attribute <player> minecraft:generic.armor get
      5. Observe that the server returns 0.0 for the above command, which is mismatched from the client.

      This issue is caused due to a combination of how attributes sync and MC-181604

      Upon returning from the end portal, all AttributeInstance(s) on the ServerPlayer are lost, only being recreated if that particular attribute is modified. 

      The AttributeInstance(s) of the LocalPlayer are not discarded as a result of this operation.

      Attributes are not synced to the client unless an AttributeInstance is created (which only happens on modification), but due to the usage of /attribute base set and the discarding done by MC-181604 the server resets to the original base value, while the client retains the base value set by the command.

            Unassigned Unassigned
            Shadows_of_Fire Shadows_of_Fire
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: