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:[]}
If I am correct that this is your layout:
Then this solution should work:
Note that this is a sticky piston.
Best Answer
You can use
/fill
command.I imagine you will have something like square map , for example 50 * 50. You need to know coordinates of corners and it would be good to have it surrounded by some solid blocks (glass, stone, etc), so lava won't flow everywhere...
Then inside a map you will have some islands etc.
All you need is some control room, for example I would make it above the gameplay area, so you can have access for it and there is no problem with loading the chunks... In this area you will need some redstone.
I already mentioned /fill command, this will be useful.
For our use it will shrink into :
Now how to setup it:
Resumé:
Check the coordinates of opposite corners of arena, one will be x1,z1, second will be x2,z2. Y coordinate will be same in both parts of command, meaning the layer you want to flood.
Now the timers. You can make kinda extended redstone setup (repeaters slowing signal down, or droppers, hoppers, etc), or you can use /scoreboard.
If using redstone, all you need is to start the game by pressing some button and let redstone flow (best would be with hoppers which can slow down the current for long time, but are compact) run through the commands. Then it depends on how fast you will make the redstone.
So your commandblocks will be something like:
For resetting arena, you can then use something like reverse command: