Jaffe2718 / Command-Debug-DevKit

This project is written for debugging Minecraft command.
https://modrinth.com/mod/command-debug-service/
MIT License
13 stars 1 forks source link

Functions can now contain macro lines, making them Function Macros #7

Closed Jaffe2718 closed 12 months ago

Jaffe2718 commented 1 year ago
Jaffe2718 commented 1 year ago

Test plugin 1.1.2-rc1.

Ayfri commented 1 year ago

image Doesn't seem to be working well using 1.1.2 release.

Jaffe2718 commented 1 year ago

So far, this is just an experimental feature. I'm not familiar with macro syntax yet, and it may take a long time to perfect this feature.

Jaffe2718 commented 1 year ago

image Doesn't seem to be working well using 1.1.2 release.

Try 1.2.0-rc5

Jaffe2718 commented 1 year ago

It seems that version 1.2.0-rc5 has a bug in the plugin's ability to create projects that prevents the creation of packet projects. Try this one 1.2.0-rc6

Ayfri commented 1 year ago

It's now working almost as expected, I'm still getting an error though: image

Jaffe2718 commented 1 year ago

It's now working almost as expected, I'm still getting an error though: image

1.2.0-rc7

Ayfri commented 1 year ago

image Working as expected !

Maybe for a more complex feature that can be made far in the future, you could add navigation from the macro to the commands calling the current function with the arguments as a JSON object. For example, my screen is on the function1.mcfunction, in the function2.mcfunction I have this code:

function datapack:function1 {my_macro: "test"}

When CTRL clicking (or CTRL B) to $(my_macro), the function2.mcfunction file on the first line would be listed as the usage of the macro.

Jaffe2718 commented 1 year ago

There are some details of the syntax that I need to test, for example:

say hello \
 world

say try to send \\

I need to adjust these details to match the actual results of the program.

Jaffe2718 commented 12 months ago

https://github.com/Jaffe2718/Command-Debug-DevKit/releases/tag/p-1.2.0