Proposal:
I would like to suggest a command that works like /scoreboard, where variables can be defined. It would work by first declaring a new variable, like how a new scoreboard objective is defined, and the variable type as well (integer, string, item, etc.). This would give the player more control over specific situations, and would make some other situations able to be automated. If I want to make the distance I teleport dependent on the blocks around me, I could add to an existing variable automatically, and make the teleportation coordinates vary, instead of using an overly complex scoreboard mechanism. Variables for item types could store NBT data, allowing for easy retrieval of custom items. Variables could be stored like structures, in a separate folder, and could be implemented through datapacks as well. The only downside that I can think of would be that if they are used to supplement long values, they may exceed command block limits and cause issues.
/variable Command Syntax:
/variable new <variable name> <data type> <value> {<NBT>}
/variable modify <variable name> <value>
/variable remove <variable name>
/variable list
/variable operation <variable 1> <operation> <variable 2> <variable 3>
<variable 3> is the variable where the resulting data is stored
differing data types can't be operated together
Use and Examples:
/tp <player> dbl:x dbl:y dbl:z
/give <player> item:custom_boots
/give <player> minecraft:sword{Display:{Name:"str:sword_name"}}
/summon mob:custom_mob ~ ~ ~
Please sign in to leave a comment.
1 Comments