Mojira Archive
MCPE-168545

“button_pressed_bit” does not work without “facing_direction”

Place down any kind of button. Type in the command:

/testforblock <x> <y> <z> <id>["button_pressed_bit":false]

and replace <x>, <y>, and <z> with the coordinates of the button and <id> with the identifier of the button (e.g. wooden_button).

The command should detect the button if it is not pressed, but even though the button matches the specified state, the following error appears:

The block at <x>,<y>,<z> did not match the expected block state.

 

However, adding facing_direction to the command fixes the issue:

/testforblock <x> <y> <z> <id>["button_pressed_bit":false,"facing_direction":1] 

In this case, the value of facing_direction is 1 because the button was placed on top of a block and is facing up.

The command also works without button_pressed_bit:

/testforblock <x> <y> <z> <id>["facing_direction":1]  

The output is:

Successfully found the block at <x>,<y>,<z>.

 

As you can see, providing only button_pressed_bit (without facing_direction) does not detect the button, regardless of its state.

Duplicate

Edc312

2023-03-17, 09:18 PM

2023-03-18, 12:01 AM

2023-03-17, 11:56 PM

0

0

Unconfirmed

1.19.70

-