Hi - I've tried multiple variations of having a procedure on a block that when destroyed by the player or explosion, the block is dropped. The player is able to pickup the block and everything works. What I'm now trying to add to this is the option to also drop an XP Orb so that the player can also earn experience points with these ores I'm working on.
I've tried just calling a command of: xp 8 @p in its simplest form and also added a do while and checked for the block being broken followed by the command to create the orb and play the sound (playsound minecraft:entity.experience_orb.pickup ambient @p). Neither of the commands appear to be executing as I don't see the orbs and I don't hear the sound playing.