mojira.dev
MC-159468

"Level" blockstate is reversed through commands

The bug

The water and lava "level" blockstate is reversed when identifying them using commands.

Steps to reproduce

  1. Place a water source

  2. Stand inside the water block next to the source

  3. Run the following command: execute if block ~ ~ ~ water[level=7]

If done correctly, this command should fail. If identified through the debug ui however, the information correctly shows that the water level is in fact 7. Now repeat the steps listed above but stand at the last water block flowing out of the source. If done correctly, the command should succeed.

Linked issues

Attachments

Comments 7

Where do you see level=7 on the debug screen?

The debug screen (ui) shows the correct information, but commands give the reversed order.

Yes, where is this information displayed on the debug screen?

It's displayed under "Targeted Fluid".

Ah, thank you. I was looking at still water the whole time, haha. Technically that is a fluid state rather than a block state... at this time they should probably match, but I think the eventual full separation of fluids would make this report obsolete. Anyway, might as well leave it open in the meantime.

As mentioned, block state is different from fluid state. In this case, while fluid state is "flowing_water[falling=false,level=7]", underlying block state is "minecraft:water[level=1]".

Makzevu

boq

Confirmed

Normal

Block states, Commands

block-state, lava, water

1.14.4, 19w34a, 19w35a

Retrieved