How do I place a lantern on the side of a wall?

Solution 1:

I believe the information you found is just incorrect. In my experience with Java Edition, lanterns can only be placed above or below a block. Tested with Java Edition 1.17:

Test case with 3 block types

I made the same test in Android (Bedrock Edition) v1.17.2 creative and got the same results.

Alternatives

In order to mount a lantern on a wall, I would suggest using a fence as a bracket:

Lantern hanging below fence

You could also use iron bars to match the lantern chain better, but I don't think it looks very tidy:

Lantern hanging below iron bars

Solution 2:

It seems we have a classic Wiki SNAFU. One person wrote: "Lanterns can be placed on walls with no support on Java edition but cannot do this on Java edition, it requires support from a block and won't hang from a fence or the wall."

Probably, the second part was applicable to Bedrock Edition, and the person meant the Wall block.

enter image description here

The subsequent editor "fixed" the entry while misunderstanding the meaning of "wall" : *In Java Edition, lanterns can be placed on walls with no support. In Bedrock Edition lanterns must be placed on the top or bottom surface of a solid block, and cannot be placed on the side."

Well, in Java Edition, lanterns definitely can be placed on top of, or hanged under Walls:

enter image description here

and they can't be placed on sides of either walls or solid blocks.

Solution 3:

Place any block where you want the lantern. Then look at the block, press F3 + i, open the chat window, press Ctrl + V and change the block name to "lantern"

For example: /setblock 248 68 -23 minecraft:stone

you change to: /setblock 248 68 -23 minecraft:lantern

...unfortunately, the lantern has a certain distance to the wall but you can place every block you want with this to every position, except it causes a block update, then it doesn't work!