Put mod in your mods folder. This mod is client-side only.
Note: this mod requires Fabric API and Fabric Language Kotlin
While in survival mode hover an inventory slot with mouse and press Alt. This will toggle the slot, and it will be used as a source for random blocks. To use the slot, it should contain item stack.
Take a block in your hand and place it. You will see that after you placed the block, item in your hand was replaced with contents of previously selected slot.