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

'data modify from string' index failure does not return 0 for 'execute store success'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20 Pre-release 2
    • 1.19.4 Pre-release 1, 23w14a
    • None
    • Community Consensus
    • Commands, Save Data
    • Normal
    • Platform

      Issue/Expected result:{}

      If you attempt to data modify from a string, but your end exceeds the length of the string, the command returns "unexpected error".

      The expected result in my opinion is that since the command failed, we get a success of 0, however, as you will see, success erroneously returns 1

      Steps to reproduce:

       

      #simple setup for the following code to work
      /summon marker ~ ~ ~ {Tags:["example"]}
      /scoreboard objectives add test dummy
      /scoreboard objectives setdisplay sidebar test
      #Correctly success=1, marker->data.message has 'over'
      /execute store success score @p test run data modify entity @e[type=marker,tag=example,limit=1] data.result set string entity @p SpawnDimension 10 14
      #Marker data does not update, however, success is still true
      /execute store success score @p test run data modify entity @e[type=marker,tag=example,limit=1] data.result set string entity @p SpawnDimension 10 100

            slicedlime [Mojang] slicedlime
            pauloalbert paulo khayat
            Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: