mojira.dev
MC-300950

execute if function inconsistent if the function does not exist

Steps to reproduce:

Run the following with only the vanilla datapack enabled

/execute if function example:example run say true
/execute unless function example:example run say true

Observed behaviour:

In neither case say true is executed

Expected behaviour:

fail is returned therefore the second case should execute say hi

Comments 2

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Both commands actually fail, but error is hidden due to how /execute works (it would be visible with trace command)
In future we are likely to instead make command not compile at all on missing function.

Player_X_YT

(Unassigned)

Confirmed

(Unassigned)

1.21.8, 25w32a

Retrieved