WingedSeal / jmc

A compiler for JMC (JavaScript-like Minecraft Function), a mcfunction extension language for making Minecraft Datapack
https://jmc.wingedseal.com
MIT License
64 stars 7 forks source link

[FEATURE_REQUEST] Shorthand syntax for `execute if function` #108

Open Nico314159 opened 1 month ago

Nico314159 commented 1 month ago

Description

Minecraft 1.20.3 added the execute if function command, which can be quite useful. JMC does support putting such a condition into an if statement, but we're limited to using the vanilla syntax for the actual condition. Eg:

if (function namespace:my_func) {...}


It seems like a bit of a feature gap that the more intuitive option of

if (my_func()) {...}

is not yet supported. I especially would appreciate being able to use the JMC custom syntax here because I use the this keyword quite often when working in nested folders.