As of the latest, latest snapshot (14w02b), this is most certainly possible. In fact, there's an easier way to do the whole thing now, which is awesome. With the /blockdata
command added in the snapshot, you can modify and overwrite the contents of a tile entity (including a chest), and much, much more. The applications of /blockdata
go beyond what I can fully comprehend at this point in time, but, for this specific case, it's not too hard.
Let's say for example your equipment chest is supposed to contain a notch apple, a gold sword, a bow, and a stack of arrows. The command for that would be /blockdata X Y Z {Items:[{id:322,Damage:1,Count:1,Slot:0},{id:283,Count:1,Slot:1},{id:261,Count:1,Slot:2},{id:262,Count:64,Slot:3}]}
, replacing X Y and Z as appropriate. There's a lot of stuff going on in that command, but essentially, you are changing the data of the chest to contain the specified items. It's the same concept as using /setblock
to spawn a new chest with these items, except instead of replacing the chest, you're overwriting its data.
In this more specific case, you want /blockdata 264 4 997 {Items:[{id:274,Count:1,Slot:0},{id:275,Count:1,Slot:1}]}
.
And, of course, if you want an empty chest, all you need to do is use /blockdata X Y Z {Items:[]}
You can use command blocks to set an area to adventure mode, this could be used so that the room with the chest in can't have blocks broken.
This command will set adventure mode for anyone within a radious of 20 blocks. Just have this activated by a pressure plate or two as they enter the room or leave it.
/gamemode 2 @a[m=0,r=20] (r=20 will set the area radius to 20 blocks)
This will set the gamemode to normal for anyone outside of 20 blocks
/gamemode 0 @a[m=2,rm=20] (rm=20 will set the mode for anyone that is more than 20 blocks away.
Just change the radius and the position of the command blocks depending on your situation.
Source
Best Answer
Every time you enter The End the obsidian platform is regenerated and three high space above it is cleared from any blocks. If you placed the chest directly on the obsidian platform, it would be deleted.
If the disappearing chest is somewhere else in The End you might be experiencing a very weird and oddly specific glitch, which is unlikely. The dragon doesn't move while you are not in The End, so it won't be destroying the chest without you being able to witness it.