When using the command /setblock ~ ~ ~ piston_extension
the invisible block that is created has a data value of 2. Usually the data value defaults to 0, this is for instance the case with air and stone.
Steps to Reproduce:
Execute
/setblock ~ ~ ~ piston_extension
Execute
/testforblock ~ ~ ~ piston_extension 0
What I expected to happen was...:
The block should have a data value of 0 and the testforblock command should be successful.
What actually happened was...:
The block had a data value of 2 and the testforblock command failed with the message:
The block at -1500, 57, -407 had the data value of 2 (expected: 0)
Workaround
Use
/setblock ~ ~ ~ piston_extension 0
to create the blockUse
/testforblock ~ ~ ~ piston_extension -1
to detect the block
Comments 4
Since I can't find information on it, how would I for instance place a granite using block states? This does not work: /setblock ~ ~ ~ minecraft:stone variant:granite
piston_extension
is a technical block and is not intended to be used in game.