How do I get 6-sided blocks?

Solution 1:

There are only two of these blocks that I know of: All-bark log, and the 6-sided piston head you mentioned.

The logs are minecraft:log with a data value of 3 in 0x4 and 0x8 bit, that is, add 12 to the normal data value of the log to get all-bark.

setblock ~1 ~ ~ minecraft:log 13

The piston wiki entry is strange, it talks about 0x0 through 0x7, which is technically wrong but we can work with it. In actuality bits 0x1 through 0x4 (0-7) determine the piston facing, while 0x8 (+0/+8) determines if the piston is extended or not.

That being said, the 6-sided piston head is listed as 6 or 7 (14 or 15 if extended). However, using

setblock ~1 ~ ~ minecraft:piston 6

results in an error message saying:

An unknown error has occured while attempting to perform this command

This happens for all combinations of minecraft:piston or minecraft:piston_head and data values of 6, 7, 14 or 15. Using the give command using this data value gives you a checkerboard block, which works like a piston (Because, like with a regular piston, the data value is changed when the block is placed).