Started by
Pyrovoltage
on
Topic category: Help with Minecraft modding (Java Edition)
I was curious how to make an ore not drop XP when broken with the silk touch enchantment. I can't figure it out. I know it involves the checking of the item in the hand of the entity and checking item enchantment but I'm stumped.
Hello there! It's actually a pretty straightforward procedure, but I get how it can be tricky to piece together this stuff.
I came across the same issue in a mod I'm working on, and I've actually attached a screenshot of the working procedure!
It basically checks if you're in creative mode, first of all, and if you aren't, it'll test if your itemstack (the tool in your hand) doesn't have silk touch, through the little "not" procedure block there. Once it tests for all that, it'll spawn the XP orb!
https://imgur.com/vpAy2Qj