Why does my /setblock command not work?

/setblock ~ 1 ~ lapis_ore 

that command doesn't seem to place the ore. i have also tried

/setblock ~ 1 ~ lapis_lazuli_ore 

And it still doesnt work.


Solution 1:

lapis_ore is correct according to the Minecraft Wiki. It's probably something to do with your setup, and I can hazard a guess to your problem.

The coordinates ~ 1 ~ means to use your X and Z, but use Y level 1, which is at the bottom of your world. You may have actually meant to use ~ ~1 ~ which means "my Y level plus 1", instead of actually using the Y level 1.