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

Decomposed transformation sometimes requires all properties to be set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 23w06a, 1.19.4 Pre-release 1
    • None
    • Confirmed
    • Commands

      When setting the transformation property in the summon or data modify command in the decomposed (TAG_Compound) form, all four properties are required; otherwise, the entire object is set to default and an error is logged. This requirement does not exist for the data merge command. Setting the transformation property in the matrix (TAG_List) form works as expected.

      As an example, the following two commands do not work as expected:

      • /summon minecraft:block_display ~ ~ ~ {block_state:{Name:"minecraft:lime_glazed_terracotta"},transformation:{scale:[2f,2f,2f]}} 
      • /data modify entity @e[type=minecraft:block_display,limit=1,sort=nearest] transformation set value {scale:[2f,2f,2f]}

      Whereas the following do work as expected:

      • Specifying all four properties:
        • /summon minecraft:block_display ~ ~ ~ {block_state:{Name:"minecraft:lime_glazed_terracotta"},transformation:{translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],scale:[2f,2f,2f],right_rotation:[0f,0f,0f,1f]}}
        • /data modify entity @e[type=minecraft:block_display,limit=1,sort=nearest] transformation set value {translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],scale:[2f,2f,2f],right_rotation:[0f,0f,0f,1f]}
      • Using matrix form:
        • /summon minecraft:block_display ~ ~ ~ {block_state:{Name:"minecraft:lime_glazed_terracotta"},transformation:[2f,0f,0f,0f,0f,2f,0f,0f,0f,0f,2f,0f,0f,0f,0f,1f]}
        • /data modify entity @e[type=minecraft:block_display,limit=1,sort=nearest] transformation set value {scale:[2f,0f,0f,0f,0f,2f,0f,0f,0f,0f,2f,0f,0f,0f,0f,1f]}
      • Modifying a specific property:
        • /data modify entity @e[type=minecraft:block_display,limit=1,sort=nearest] transformation.scale set value [2f,2f,2f]
      • Using data merge:
        • /data merge entity @e[type=minecraft:block_display,limit=1,sort=nearest] {transformation:{scale:[2f,2f,2f]}}

      Expected behaviour

      The command summons an entity with the specified transformation values set, and the unspecified values set to default.

      Actual behaviour

      Upon running the command, the following error message is logged by the server thread:

      Display entityNot a list: {scale:[2.0f,2.0f,2.0f]}
      

      The entity has the default appearance, and all of its transformation data is set to their default values.

            Unassigned Unassigned
            JochCool JochCool
            Votes:
            8 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: