Execute command doesn't work in mcreator 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 mcreator 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 ingame because maybe i typed it wrong. but it worked completely 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 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your execute is prob failing…
Thu, 05/14/2026 - 08:07

Your execute is prob failing because the player NBT structure changed in newer versions (especially around 1.20.5+ / 1.21 with the data component update)

im guessing the problem is this part:

nbt={equipment:{feet:{id:"vs_mod_for_justaguy:opalarmor_boots"}}}

 

equipment is no longer a valid player NBT path for selectors in 1.21.8 if i remember, try using the new Inventory / components  OR use  if items instead.

Joined May 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your execute is prob failing…
Fri, 05/22/2026 - 14:08

Your execute is prob failing because the player NBT structure changed in newer versions (especially around 1.20.5+ / 1.21 with the data component update)

im guessing the problem is this part:

nbt={equipment:{feet:{id:"vs_mod_for_justaguy:opalarmor_boots"}}}

 

equipment is no longer a valid player NBT path for selectors in 1.21.8 if i remember, try using the new Inventory / components  OR use  if items instead.

Nope it still doesnt work