Started by
vanilama
on
Topic category: Help with Minecraft modding (Java Edition)
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
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/componentsOR useif itemsinstead.Nope it still doesnt work