© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
AdmincraftA
Admincraft•3y ago•
10 replies
TwіѕtedWar3713

Detecting Silk Touch Enchant

Hey! Could someone tell me what I am doing wrong?

execute as @a at @s unless data entity @s SelectedItem.tag:{Enchantments:[{id:"16"}]} run give ...
execute as @a at @s unless data entity @s SelectedItem.tag:{Enchantments:[{id:"16"}]} run give ...


I also tried...

execute as @a at @s if data entity @s[nbt={SelectedItem:{tag:{Enchantments:[{id:silk_touch}]}}}] run give ... 
execute as @a at @s if data entity @s[nbt={SelectedItem:{tag:{Enchantments:[{id:silk_touch}]}}}] run give ... 


I am trying to detect if the player is using silk touch or not mining a block to then give him the custom ore or the ingot, I have all the other stuff but this one does not work... I searched in google and this should work :/ (Minecraft Java 1.20.1)
AdmincraftJoin
10,704Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Spawner Breaking with Silk Touch ?
AdmincraftAAdmincraft / questions
11mo ago
Enchants showing up wrong in enchant table??
AdmincraftAAdmincraft / questions
2y ago
Disable specific enchant
AdmincraftAAdmincraft / questions
9mo ago
Enchant disabler plugin?
AdmincraftAAdmincraft / questions
2y ago