The facing of a chest is determined by it's block data value, ranging from 2 to 5 (North, South, West, East). For Falling Sand Entities the data value of the block can be set by adding a Data
tag to the entity:
/summon FallingSand 2140.5 9 -423.5 {Block:minecraft:chest,Data:2,Time:1,TileEntityData:{Items:[{id:diamond_helmet,Slot:0,Count:1},{id:diamond_chestplate,Slot:1,Count:1},{id:diamond_leggings,Slot:2,Count:1},{id:diamond_boots,Slot:3,Count:1},{id:diamond_sword,Slot:4,Count:1}]}}
(I also replaced TileID
with the newer Block
. This doesn't exactly matter, but numerical IDs are being phased out gradually, and I expect TileID
to break in the future.)
However, as pointed out by MBraedley in the comments, summoning a chest with items can be done directly via setblock
, rather than using the old roundabout way of summoning falling sand.
The syntax is
/setblock <x> <y> <z> <TileName> [dataValue] [oldBlockHandling] [dataTag]
Here, the data value can be set directly. To set the data tag, you'll need to specify oldBlockHandling
, I suggest using the default value of replace
:
/setblock 2140 9 -423 minecraft:chest 2 replace {Items:[{id:diamond_helmet,Slot:0,Count:1},{id:diamond_chestplate,Slot:1,Count:1},{id:diamond_leggings,Slot:2,Count:1},{id:diamond_boots,Slot:3,Count:1},{id:diamond_sword,Slot:4,Count:1}]}
This command is not only shorter and easier to read, it also executes much faster than the summon version. That is because it doesn't need to create an entity, have it drop to the floor, determine collision, and then turn it into a block and remove the entity.
setblock
? As a bonus, usingsetblock
will solve your problem.setblock
. As it turns out, you are able to do what you want with falling sand, but the more important point is that you seem to be stuck in the X/Y problem. You're assuming the solution, at least with your title, instead of focusing on the problem.TileID
is kind of deprecated in 1.8, theBlock
tag should be used instead.