If I right click the bed in the nether or the end and it is is too far away it still explodes. It should say You may not rest now; the bed is too far away.
Attachments
Comments 3
@unknown my girlfriend and I are confused what you mean by "noot". Your comment sounds like you are speaking Africaans and forgot to translate it to English and actually mean "bill".
I can confirm this behavior, though after looking through the code, I'm inclined to believe that this is working as intended similar to MC-255074, however, that isn't my decision to make.
Code Analysis:
The following is based on a decompiled version of Minecraft 1.19.2 using Mojang mappings.
net.minecraft.world.level.block.BedBlock.java
If we look at the above class, we can see that only one check is carried out before a bed is able to explode upon it being interacted with. This check is to see if the bed is able to set the player's spawnpoint. Since the
canSetSpawn
boolean returnsfalse
when the bed is placed in dimensions other than the overworld, the bed is simply then designed to explode when the player attempts to sleep in it, regardless of whether or not you're too far away from it.