Logo

A feedback area designed for scripting and mods suggestions and feedback. Please note bug reports and support issues will be removed.

Please sign in to leave a comment.

  • Avatar
    Robin Rogge commented

    I have an update:

    It would also greatly improve the entire NBT handling via commands if next to what I've mentioned above the game would support an 'nbt' type, basically containing an entire NBT tag (and obviously its content.)
    Like this copying inventories, effects or other information could be done with just one '/execute store' call.

    The problem with both this and the 'string' type would - thinking about it - be the same.
    All data-types mentioned above are primitive (at least in terms of Java).
    Both the 'string' and 'nbt' would have to be handled as objects, and the size of them would vary.
    They could be everything from a few bytes to millions, which could be problematic and might slow the game down if used incorrectly.
    The thing is that every command can (if used incorrectly) theoretically slow the game down. It would still depend on how it would be implemented by the players, so the performance cost should be an irrelevant point.

  • Avatar
    MukiTanuki commented

    It's a nice idea, but /execute store and /data get only support numerical values.  If something like this were to be added in the future, it would be much better to have separate commands for them such as /execute write and /string or /read that could get and convert outputs into strings.    Separate  commands like this would also allow much more extendability, with features such as replace, trim, concat, join, split, substring, upper and lower casing, etc.

  • Avatar
    Ferdinand Souchet commented

    Good idea.

  • Avatar
    Robin Rogge commented

    @MukiTanuki I know that they only store numerical types, I stated that above in my post, I simply requested that it should be expanded to one (or two, see comment) more types.
    Since the functionality would basically be the same, I think it would be the easiest way to integrate the functionality into the existing commands and it shouldn't lead to any downsides (besides the mentioned data-sizes).

  • Avatar
    MockMango7 commented

    this would be very very useful! I ran in to this when I was trying to spread armor stands throughout the entire world, making them impossible to retrieve for they are in unloaded chunks. Now what I did was the following:
    I set up 3 command blocks which constantly store the armor_stands x, y and z values in scoreboard objectives. This will store their new location when you use /spreadplayers on them, making it possible to teleport to them. Now that's very useful, but I want to use tellraw to make a tp command from these scoreboard values like so:
    /tellraw @p ["",{"text":"/tp @p "},{"score":{"name":"@s","objective":"x"}},{"text":" "},{"score":{"name":"@s","objective":"y"}},{"text":" "},{"score":{"name":"@s","objective":"z"}}]
    And that works perfectly, but then I wanted to use the /execute store command to store that sentence in a commandblock, which I could then use to teleport to the armorstand. I started making the command and then I discovered that string saving is not a thing :(( I really hope this will be added in the near future!

Powered by Zendesk