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)
-
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)?– randomuser922Commented Jan 8, 2021 at 20:23
-
the "randomizer" gamemode you probably got this idea from is in datapack form– TopcodeCommented Jan 9, 2021 at 19:23
Add a comment
|
1 Answer
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.