Execute command doesn't work in functions

Started by vanilama on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Execute command doesn't work in functions

i created a function in my 1.21.8 neoforge mod on mcreaotr 2026.1.14619 with the following commands:

problem is that any command other than the execute command works.
and i tried the execute commands inagme because maybe i typed it wrong. but it worked completly fine ingame.

# Enter the function code here
say Ability Used
execute as @a[nbt={equipment:{feet:{id:"vs_mod_for_justaguy:opalarmor_boots"},legs:{id:"vs_mod_for_justaguy:opalarmor_leggings"},chest:{id:"vs_mod_for_justaguy:opalarmor_chestplate"},head:{id:"vs_mod_for_justaguy:opalarmor_helmet"}}}] run tag @s add Use_Opal_Sword_Ability
execute as @a[nbt={equipment:{feet:{id:"vs_mod_for_justaguy:opalarmor_boots"},legs:{id:"vs_mod_for_justaguy:opalarmor_leggings"},chest:{id:"vs_mod_for_justaguy:opalarmor_chestplate"},head:{id:"vs_mod_for_justaguy:opalarmor_helmet"}}}] run playsound minecraft:entity.experience_orb.pickup master @a[tag=Use_Opal_Sword_Ability] ~ ~ ~ 100 0
Joined May 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it's already pretty late for…
Sat, 05/09/2026 - 20:02

it's already pretty late for me so if someone answers i'll probably see it tomorrow. currently its 10pm for me

Joined May 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no answer still?. well no…
Mon, 05/11/2026 - 16:17

no answer still?. well no one is required to answer but well