mojira.dev
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.

Linked issues

Attachments

Comments 1

Thank you for your report!
We're tracking this issue in MCPE-168391, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

Edc312

(Unassigned)

Unconfirmed

iOS

iOS 15.6.1

1.19.70

Retrieved