Two blocks in 1 grid space

how to make it to be where an item cant spawn in the same space as another

You could use dice on places in x and y coordinates