-1

how do I make a random Item drop from a random block. Is it /execute {blocks:"minecraft:stone"} summon Item [name=coal] or is it super long or can I not do It (on xbox)

2
  • Do you want an item to drop when broken with an appropriate tool(you would need an add on for this)? Or when the block is broken in any way(commands could accomplish this)? Commented Jan 8, 2021 at 20:23
  • the "randomizer" gamemode you probably got this idea from is in datapack form
    – Topcode
    Commented Jan 9, 2021 at 19:23

1 Answer 1

0

You can set up a dropper that shoots an item/block when a /testfor @e[type=item,name="Item Name",c=1] returns true.

Then have a command block that waits say 5 ticks to fire that teleports the dropped item (/tp @e[type=item,r=3,name="Alternate Item"] @e[type=item,name="Item Name",c=1]) and after that /kill @e[type=item,name="Item Name",c=1] the first item.

You can use this method for randomization once you've got the basics set up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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