How should I go about "reseting" a large arena?

How should I go about "reseting" a large arena? - Modern football stadium with spectators on tribunes

For a minigame map I am making, I have a large (320*320*116) destructible arena. Players get explosives, blocks, etc. and the entire area can change. At the end of the match, I would like to restore the entire arena to its starting state, so another match can occur.

My old plan was simply to have a backup arena adjacent to the normal one, and then after a match had finished an ArmorStand would be teleported around, executing a /clone command with relative coordinates. The problem is that the clone command can only select a relatively tiny area, and takes quite a while for each execution. I estimated that I would need to /clone 400 times, and each time was taking 10 or so seconds.

Other than having the server reinstall the map each time, are there any more efficient ways I could regenerate the arena? Perhaps detecting only the chunk segments that need to be changed, or undoing each explosion somehow.



Best Answer

You could use the /clone command, with one clever difference: You have two arenas, and while one is /cloneing, the other would be used.

This may cause major lag, though. I don't know; try it.




Pictures about "How should I go about "reseting" a large arena?"

How should I go about "reseting" a large arena? - From above of modern stadium with green football field and many seats in tribune
How should I go about "reseting" a large arena? - Free stock photo of apartment, bathroom, bathtub
How should I go about "reseting" a large arena? - Rhinoceros on Brown Grass Field





How To Gain Arena Points Fast in Chapter 3 Season 3! (REACH CHAMPS FAST!) - Fortnite Tips \u0026 Tricks




More answers regarding how should I go about "reseting" a large arena?

Answer 2

If you would like to actually reset the map in-game, you could use the /fill command (Preferably in command blocks) to set all the blocks back to normal and get rid of any fires, etc. and use the /kill @e to kill all mobs (Do /kill @e[type=creeper,Zombie,Skeleton] and etc. to kill only the mobs you spawn and not actually you). You could use additional /setblock commands for any areas not on the certain y-axis (1 strange block on the 105 y-axis, while the rest of the arena is on the 104 y-axis).

The fill command: /fill x1 x2 x3 y1 y2 y3 BlockType

If, though, you would like to use the hidden files (%appdata%) and create backup files of the arena you could do that too, but that would probably not be possible in your situation.

Hope this helped! If you need further information make sure to comment and I will answer it! :D

Answer 3

Using scoreboards, you can track the placement of blocks and do a local clone of that area, but I don't know the command itself; the only reason I know it exists is because a Youtuber used it to make Zelda bombs here, but really with a space that big the only good way to replace that many blocks is to do it with individual command blocks, if the games lasts a while I would build 3 instances, 1 that you use for the cloning, and two for playing on, like ratchet freak said, that way you can continue playing another game while the command blocks work on repairing the first game you played, other than that you could always save a world file with the intact map and reload it after every game, although that might not be a viable option in your situation.

Answer 4

/clone it somewhere first, and when player leaves area, /clone it back. Check for player is done by

/testfor @a[x,y,z,r=rad]

runned into comparator out of commandblock, to inverter and to /clone commandblock for cloning back. replace x,y,z are coords of area center, and rad is how big is area as a circle.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Mustafa Kılıç, Kelly, Curtis Adams, Nirav Shah