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

Selector "sort=" does not work properly with newly summoned entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.14.4
    • None
    • Windows 8.1
      Java 1.8.0_51 64bit
    • Unconfirmed
    • (Unassigned)

      summon area_effect_cloud 0 0 0 {CustomName:"{\"text\":\"0\"}",Duration:1,Tags:[test_e]}
      
      summon area_effect_cloud 0.1 0 0 {CustomName:"{\"text\":\"1\"}",Duration:1,Tags:[test_e]}
      
      summon area_effect_cloud 0.2 0 0 {CustomName:"{\"text\":\"2\"}",Duration:1,Tags:[test_e]}
      
      summon area_effect_cloud 0.3 0 0 {CustomName:"{\"text\":\"3\"}",Duration:1,Tags:[test_e]}
      
      summon area_effect_cloud 0.4 0 0 {CustomName:"{\"text\":\"4\"}",Duration:1,Tags:[test_e]}
      
      execute positioned 0 0 0 run say @e[tag=test_e,limit=1,sort=furthest]
      execute positioned 0 0 0 run kill @e[tag=test_e,limit=1,sort=furthest]
      execute positioned 0 0 0 run say @e[tag=test_e,limit=1,sort=furthest]

      Running this function should output:
      4
      3
      but the actual output is:
      1
      2

      summon area_effect_cloud 0 0 0 {CustomName:"{\"text\":\"0\"}",Duration:1,Tags:[test_e]}
      
      summon area_effect_cloud 0.1 0 0 {CustomName:"{\"text\":\"1\"}",Duration:1,Tags:[test_e]}
      
      summon area_effect_cloud 0.2 0 0 {CustomName:"{\"text\":\"2\"}",Duration:1,Tags:[test_e]}
      
      summon area_effect_cloud 0.3 0 0 {CustomName:"{\"text\":\"3\"}",Duration:1,Tags:[test_e]}
      
      summon area_effect_cloud 0.4 0 0 {CustomName:"{\"text\":\"4\"}",Duration:1,Tags:[test_e]}
      
      execute positioned 0 0 0 run say @e[tag=test_e,limit=1,sort=nearest]
      execute positioned 0 0 0 run kill @e[tag=test_e,limit=1,sort=nearest]
      execute positioned 0 0 0 run say @e[tag=test_e,limit=1,sort=nearest]

      Running this function should output:
      0
      1
      but the actual output is:
      0
      4

       

            Unassigned Unassigned
            NOPEname NOPEname
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: