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

The data like Pose.Head might unexpectedly be invalid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.20.1, 1.20.2 Pre-Release 4
    • None
    • Unconfirmed
    • (Unassigned)

      If the value of data Pose of an armor stand is empty, the element of Pose.Head cannot be modified by data command as it hasn't been created. Even if Pose.Head has been created, Pose will return empty if Head become [0.0f, 0.0f, 0.0f].

      More detailed, for example, we summon a armor stand without more nbt data. Now run the command

      /data modify entity @e[type=armor_stand, limit=1, sort=nearest] Pose.Head[0] set value 45.0f
      

      then it fails. However, if run the command

      /data modify entity @e[type=armor_stand, limit=1, sort=nearest] Pose.Head set value [45.0f, 0.0f, 0.0f]

      then it succeed, and now the former command can be run, unless the value is 0.0f.

      Thus the modification of Pose.Head will unexpectedly become invalid when its elements all return to zero, which makes it unstable to automatically update the rotation of head of armor stand in some cases.

      I can understand it workes as intended to be used to save some insignificant storage space, but the troubles outweight the benefits. There might be an alternative solution using function macro which appears in 1.20.2 though, it is undeniably a bad choice. Such an automatic omission might occur somewhere else, which causes difficulties likewise.

      So please don't remove the value of Pose when it's elements all return to zero.

            Unassigned Unassigned
            JKfungus JKfungus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: