Try the Commands Troubleshooting and Help page if you get stuff with server errors.
Suspicious Blocks
Generate commands for the suspicious blocks, such as suspicious sand and suspicious gravel. These blocks accept a single item or loot table for random items. The suspicious blocks can only loot an item once, and only by using a brush. All other ways of mining or moving will cause the contents to be lost. Both suspicious sand and suspicious gravel work the same.
Item Command
A suspicious block can contain a single item, that item can have both a quantity and item tag. The command is simular to other blocks that contain items. The item tag can contain enchantments, attributes, and other item data.
/give @a suspicious_sand{BlockEntityTag:{item:{id:diamond_pickaxe,tag:{Enchantments:[{lvl:1,id:silk_touch}]}}}} /give @a suspicious_sand[block_entity_data={id:suspicious_sand,item:{id:diamond_pickaxe,components:{Enchantments:[{lvl:1,id:silk_touch}]}}}]
Loot Table Command
The suspicious block can also use loot tables to select an item. Loot tables can be found in the Minecraft jar file. The loot table names change between verions and not every loot table produces items. The loot table will only yeild an item once.
/give @s suspicious_sand[block_entity_data={id:suspicious_sand,LootTable:"chests/ancient_city"}] /give @s suspicious_sand{BlockEntityTag:{LootTable:"archaeology/trail_ruins_common"}}
Minecraft Versions Permalinks
If you find yourself using a particular version all the time, you can link directly. There is some crossover between versions, so there will be quirks.
Version History
addedFood consumable for 1.21.2 with effects
addedDecorated Pots
addedUpdated food to consumable for 1.21.2, still has some issues with effects
addedUpdated attribute names for 1.21.2
addedSuspicious Blocks
patchHide 1.20.5 item display features for previous versions
patchForce format attribute values as numbers
Read version history »
(71 More Updates)