when running a command such as
/execute if block ~ ~ ~ skull run say hi
and standing inside a skull, the command returns false, even though it should return true. (The command doesn't run)
this doesn't just affect execute (if/unless) block, this also affects fill replace.
In general, testing for any block that has block states (without specifying any) will always look for the default state of the block, when really it should ignore states. Therefore, the following two commands are equivalent:execute if block ~ ~ ~ redstone_wire run say only unpowered redstone wire
execute if block ~ ~ ~ redstone_wire[power=0] run say only unpowered redstone wire
Linked issues
is duplicated by 2
relates to 1
Comments 5
"any block with block states will always fail to match in a command argument"
Not true; that wool example will detect white wool just fine. The problem is that, instead of missing blockstates using the default value when setting and accepting any value when testing, they just always use the default value.
Changed the example, so we don't need to do that later (MC-121742).
Updated your issue based on information I found. Hope you don't mind! π