mojira.dev
MCPE-171919

/testforblock fails to detect bed block state "occupied_bit"

Summary:

Bed block state, "occupied_bit", failing to detect accurate block state for both true & false states.

 

Steps to Reproduce:

  1. Place a bed

  2. Command: /testforblock <x><y><z> bed [ "occupied_bit" : false ] 

  3. View command feedback

Expected Results:
The bed has successfully been detected with that exact block state since there isn't a player or villager occupying it.

Observed Results:

The bed at that location doesn't match that specific block state "occupied_bit" even when there isn't anyone laying in the bed.

 

Screenshots/Videos:

https://drive.google.com/file/d/1GYiKPP8pOHOTBGotak-b9lDDbhHy0_BH/view?usp=sharing

 

Notes:
It comes back that the block did not match it's appropriate state, I've also tried with setting the Boolean to true, and lying down and it still did not detect. This is a bug I've been wanting to be resolved and I can't continue my project if this bug isn't fixed immediately sooner or later. As I'm trying to implement a system that detects if certain beds are occupied at the same time. I can't stress enough as I've done tons of research for this problem and found absolutely no solution. This bug has been occurring ever since I've tried testing for this specific block state, which was before 1.19

Linked issues

Comments 2

Testing for ["occupied_bit" : true] is never successful.
Testing for ["occupied_bit" : false] is always successful for the bed foot, and always fails for the head.

Having a villager or player sleeping in the bed makes not difference at all.

I believe "occupied_bit" does not work in block state commands for beds because beds have never had an occupied bit in Bedrock Edition. It's a Java Edition feature. I would resolve this report as a feature request except that the option actually exists in the command, and that makes it a bug.

It only works when you also specify the "head_piece_bit"=true/false". "direction" also doesn't work without it. Moreover, only when the bed is occupied by a player, it can be detected, it doesn't work with villagers.

Trxg1cMagic

(Unassigned)

1057115

Confirmed

Windows

Windows 11

1.18.32, 1.20.0

Retrieved