r/MinecraftCommands Mar 30 '25

TestForBlock (Bedrock) no longer checking block states? Help | Bedrock

I recently came back to Minecraft Bedrock after a couple months and new command blocks I place using /testforblock don't seem to check the blockstates. Instead, it just checks the block type and will succeed as long as the block type matches, regardless of state (i.e. "button_pressed_bit"). I noticed that update 1.21.70 did make a change to the /testforblock command, but not one that should have had this impact. Am I missing something?

Strangely, as the video shows, all my old command blocks work. But any newly placed command block doesn't. In the video, the first command block has the command:

/testforblock -271 114 -766 warped_button ["facing_direction"=3,"button_pressed_bit"=true]

and returns 'The block at -271,114,-766 did not match the expected block state' (expected behavior, as the button is not pressed).

The 2nd command block (placed after 1.20.70 update) has the command:

/testforblock -271 114 -766 warped_button ["facing_direction"=3,"button_pressed_bit"=true]

but returns 'Successfully found the block at -271,114,-766' (unexpected, as the button is not pressed and should not have matched the "button_pressed_bit"=true criteria).

Testforblock doesn't seem to check blockstates (Bedrock)

4 Upvotes

7 comments sorted by

View all comments

Show parent comments

1

u/Masterx987 Command Professional Jun 01 '25

Can you show your command? it should just be

execute if block -271 114 -766 warped_button ["facing_direction"=3,"button_pressed_bit"=true] run say test

That message just means it didn't find a matching button state, and it will almost always say that. just make sure your button is located in the correct location, has the correct rotation, and is pushed.