3

I know that 1.11 /fill and /setblock use block data instead of block data. However, when I try to fill an area with sticky pistons facing up, it days that my data values are incorrect. I've tried the following with various capitalizations:

/fill x1 y1 z1 x2 y2 z2 sticky_piston {facing:up}
/fill x1 y1 z1 x2 y2 z2 sticky_piston {direction:up}
/fill x1 y1 z1 x2 y2 z2 sticky_piston direction:up

From what I've read, {direction:up} or perhaps {Direction:up} should be correct. What am I missing?

2 Answers 2

2

Block states should be in the format variable=value:

/fill x1 y1 z1 x2 y2 z2 sticky_piston facing=up

Block states are also still just an alternative to numeric data values. You can use data values if you wish:

/fill x1 y1 z1 x2 y2 z2  sticky_piston 1

From the curly brackets ({,}) and colon (:), it looks like you may be getting confused with NBT, which is separate from data values/block states.

1
  • Great! I thought block states behaved similarly to NBT tags. Commented Oct 17, 2016 at 21:45
0

The way that you would do this would be /fill x1 y1 z1 x2 y2 z2 sticky_piston[facing=up]. Curly brackets and colons aren't for NBT data these days. If you want to learn more about /fill, here is a video that might help you:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .