mojira.dev
MCPE-228052

The execute command's subcommand [if/unless] blocks does not work for some blocks

How to Reproduce

Specify the patterned bookshelf with /execute [if/unless] blocks {coordinates} {coordinates} {coordinates} all run testfor @a. (testfor is for detection) (The subcommand in the image is if)

Expected Results

The command is executed when the number and location of books in the bookshelf are the same, and all players are detected.

Actual Result

Even if there are books in the same location, detection is not performed properly. It was quite unstable, as it was occasionally detected.

Attachments

Comments 3

Could you please provide an example of a command with which this issue can be observed?

1. Create a flat world and place two patterned bookshelves facing the same direction at coordinates 0 -60 0 and 2 -60 0.

2. Enter /execute if blocks 0 -60 0 0 -60 0 2 60 0 all run testfor @a in a command block set to run continuously and place a redstone comparator next to it. This will light up the comparator when a book is placed in the same location on both patterned bookshelves.

3. If you place and remove books from both patterned bookshelves, you'll see that the comparator sometimes doesn't light up even when the book is placed in the same location.

I also took a video, so please check it out.

There is no bug here. Thank you for providing the video, it was helpful. In your video, you interact with the books in a different order just before the command starts detecting the blocks as different. The last-interacted with slot is a relevant part of chiseled bookshelves' data. You can see that a chiseled bookshelf outputs redstone strength to a comparator equal to the number of its last interacted-with slot. Therefore, the command is correctly determining that two chiseled bookshelves with a different last interacted-with slot are not identical.

ИØk1

(Unassigned)

Unconfirmed

Android

1.21.101

1.21.101 Hotfix

Retrieved