Setting up a scoreboard objective to detect when a player interacts with a bed during the night AND day to change spawn point does not work; this has been tested with minecraft.used:minecraft.white_bed
(and variant colors) and minecraft.custom:minecraft.sleep_in_bed
, as well as using a custom resetting advancement to test via criteria minecraft:slept_in_bed
(makes sense, that advancement criteria trigger defines past tense and we can't sleep during the day anyways).
Expected behavior is that minecraft.custom:minecraft.sleep_in_bed
or minecraft.used:minecraft.white_bed
(and other variants) would increment when using a bed to reset spawn point during the day.
Observed behavior is nothing happens.
Steps to reproduce:
Create new world, run the following commands:
/scoreboard objectives add set_spawn minecraft.custom:minecraft.sleep_in_bed "Times Spawn was set" /scoreboard objectives setdisplay sidebar set_spawn /time set day /give @s minecraft:white_bed
Place white bed down in world
Right-click a white bed to use it
Attachments
Comments 5
Certainly minecraft.custom:minecraft.sleep_in_bed
isn't for using items though, and also suffers the same flaw. I will update the steps to reproduce accordingly since it was ignored outright.
You've already explained that the behavior makes sense as is, so why are you expecting it to be different? The used stat tracks the number of beds placed, the slept stat tracks the number of times you've slept in a bed. There is no stat that tracks setting your spawn point, whether you use a bed to do it or not.
I explained that it makes sense that the advancement criteria doesn't trigger it since it's describing having completed sleeping in a bed. It doesn't fire until the player is removed from the bed after sleeping a night away.
Sleep in bed triggers as soon as a player has gotten in the bed.
Setting spawn is not sleeping.
Statistics are not only used in objective criteria, but also in the Statistics screen. The official description for the
sleep_in_bed
stat in the screen isTimes Slept in a Bed
(you can check this inassets/minecraft/lang/en_us.json#stat.minecraft.sleep_in_bed
) which uses past tense.
Anyway, this ticket makes no sense and is invalid.
The {{used}} stats are for using an item, not interacting with blocks.