I am trying to make Minecraft harder, and one of the ways I wish to do this is to have a "pseudo-hardcore" mode where dying spawns you in a random location rather than completely locking you out of the world.

I intend to do this by setting the spawn radius to be very high.

However, I also want to make this "bed-proof" - that is, if someone places a bed and sleeps in it, I want the player to still be spawned in a random location, regardless of their personal spawn point.

How do I do this? Command blocks are fine, but data packs are not preferred.

  • You could replace all beds with air (or any other blocks) and back with beds every time someone slept. But that would require 128 commands, a bit annoying. Feb 24 '19 at 20:00
  • Why do you not want to use data packs? Feb 24 '19 at 20:01

You can overwrite their spawnpoint with an invalid location. That way, they will get the message "Your home bed was missing or obstructed", which you can't avoid, but they will respawn at the world spawn point.

/spawnpoint @a 0 0 0

Just run this in a loop. The performance might be slightly better if you only do this whenever they sleep, I don't know. In that case:

/scoreboard objectives add slept minecraft.custom:minecraft.sleep_in_bed

And the loop:

/execute as @a[scores={slept=1..}] run spawnpoint @s 0 0 0
  • 1
    Ah, I hadn't even considered just invalidating their spawn points. Thanks!
    – kkeey
    Feb 24 '19 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.