This question already has an answer here:

I have a Minecraft realm, we made a base inside of an ocean monument but we keep having Guardians spawning. I have a command set up to kill them when they spawn, /kill @e[type=minecraft:guardian] , but I don't want the items that come with them dying cause that's just taking advantage of it. Is there a way where I can "kill" Prismarine Shards, Crystals, Raw Cod, and Raw Salmon right when they die and drop their items?

marked as duplicate by user232393, Joachim, Wondercricket, Schism, Fabian Röling Sep 2 at 23:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I have 2 solutions for you. You can either burn them in lava or have them dropped for a long time and have them expire. Hope this helps!

Not the answer you're looking for? Browse other questions tagged or ask your own question.