A new subcommand of /data which allows access to macro data.
Macros are a great addition to the game. They open the doors to never before seen possibilities.
This doesn't mean that they are without flaws though. This feedback is aimed to overcome these flaws
making macros even more useful in the process.
data get macro <key + path>
It works similar to the other data storage types like entity, block and storage.
Only the function which was ran with the macro parameters has access to it.
function test:test_function {data:{int:1, string:"test"}}
A function ran with these parameters could access the macro data like this:
data get macro data
Accessing only the string field inside the data object could work like this:
data get macro data.string
This would also allow the user to check if a parameter is set:
execute if data macro data.int run say data.int is set
It should also be possible to use a NBT path to access every element inside a macro parameter directly:
$effect give @s $(effect.id) 10 0 true
Please sign in to leave a comment.
0 Comments