Minecraft – How to make an item drop in a random direction

minecraft-commandsminecraft-java-editionminecraft-redstone

On my Minecraft server, I have a mini game that requires items (tnt and redstone blocks) to be dropped in a random direction, a bit like dispensers. Is there a way I can do this?

Best Answer

This is very easy to do, and doesn't even need command blocks.

Place the dispenser with the items you want in the ground facing up. Then place a block (I recommend using glass) on top of it. When the dispenser shoots, the item gets stuck and flies in a random direction.

Note that you can put the dispenser a block lower if you want. Also, to make the items shoot farther, place blocks around the block above the dispenser.