Json Num#, if implemented into Minecraft, would allow anything using numbers (coordinates and scoreboard values) to be set using Json. This would mean that they could be set to the value of something else, without having to use tonnes of command blocks.
Examples
Usage with coordinates
You cannot currently TP an entity to the X of one entity, Y of another, and Z of a third. This would be possible if Json Num# was used in the game.
NOTE: Count is always 1, defaulting to count the nearest entity that meets the specified requirements.
The above code would tp '@p' to the X of the nearest Armour Stand with the name 'aName', a Y of 20, and a Z of relative 3. Of course 'tp @p 1 2 3' or 'tp @p @e[type=!Player]' would still work.
Scoreboard Values
The coordinates could also, if Json Num# was used in Minecraft, be set using scoreboard values:
These examples are the same for all coordinates, but any that use 2*X, Y, and Z (like /fill) have x2, y2, and z2 added on, and in the case of the /clone command, there is also x3, y3, and z3.
In the case of /tp, Json Num# has a mode called 'facedir'. This makes the teleporting be relative to the direction the targeted entity is facing, with +x being forward and +z being right. Relative coordinates must be used in this case, and, when using entities to teleport (see Entity Positions section at the top of this thread), 'facedir' will use the distance from the target entity and the second entity (relative to direction facing) and convert that to relative coordinates.
Usage Example
tp @p {facedir:1,x:~5,y:{selector:'@e'},z=-2}
Not using relative coordinates will come up with the error "Relative coordinates must be used when 'facedir' = 1."
Usage with scoreboards
Json Num# can also be used in scoreboard, to set the x, y, or z of an entity to be a scoreboard value.
Usage Example
scoreboard players set @p SCOREBOARD-NAME {selector:{target:'@e',name:'TARGET-NAME'},cdir:'x'}
Json Num#, if implemented into Minecraft, would allow anything using numbers (coordinates and scoreboard values) to be set using Json. This would mean that they could be set to the value of something else, without having to use tonnes of command blocks.
Examples
Usage with coordinates
You cannot currently TP an entity to the X of one entity, Y of another, and Z of a third. This would be possible if Json Num# was used in the game.
NOTE: Count is always 1, defaulting to count the nearest entity that meets the specified requirements.
Entity Positions
Usage Example
The above code would tp '@p' to the X of the nearest Armour Stand with the name 'aName', a Y of 20, and a Z of relative 3. Of course 'tp @p 1 2 3' or 'tp @p @e[type=!Player]' would still work.
Scoreboard Values
The coordinates could also, if Json Num# was used in Minecraft, be set using scoreboard values:
Usage Example
Equations
Equations could also be used in the Json:
Usage Example
This would teleport '@p' to the X of '@e' + 2.
These examples are the same for all coordinates, but any that use 2*X, Y, and Z (like /fill) have x2, y2, and z2 added on, and in the case of the /clone command, there is also x3, y3, and z3.
In the case of /tp, Json Num# has a mode called 'facedir'. This makes the teleporting be relative to the direction the targeted entity is facing, with +x being forward and +z being right. Relative coordinates must be used in this case, and, when using entities to teleport (see Entity Positions section at the top of this thread), 'facedir' will use the distance from the target entity and the second entity (relative to direction facing) and convert that to relative coordinates.
Usage Example
Not using relative coordinates will come up with the error "Relative coordinates must be used when 'facedir' = 1."
Usage with scoreboards
Json Num# can also be used in scoreboard, to set the x, y, or z of an entity to be a scoreboard value.
Usage Example
Cool idea support
Update:
When using equations, use:
Where the equation follows BOMDAS (or BODMAS, same thing...).
You would, however, still be able to use the old method.