#Map reset system

1 messages · Page 1 of 1 (latest)

nimble helm
#

Hello so I am trying to create a minigame and I want to reset the map after every game automatically I was thinking about using storage to store block locations with IDs and avoid using ray casting, is there actually any way of doing this ?

hollow wagonBOT
#
Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

rough kettle
#

you could store the map somewhere else and use /clone

#

or as a structure/multiple structures and then use /place

nimble helm
rough kettle
#

do it in sections

#

so ie multiple clone commands

vale socket
#

this really only applies in specific scenarios depending on what the minigame is, but i figure it might be useful

#

you can set all the air in your map to be void_air, which makes no visible or functional difference, but allows you to tell when a block has been broken (it will make a tile of regular air)

rough kettle
#

That isn’t really helpful here I don’t think

vale socket
#

unless all the blocks are the same and the player cant place blocks, yeah 💀

#

overall the /clone sila mentioned is prob the most practical and simple solution

nimble helm
#

Yup I got another problem I don't want the players to break map blocks but I want them to break and place the block that they placed/broken

vale socket
#

you can put them in adventure mode and give them blocks with “can be placed on” tags, and tools with “can break” tags

#

if you want them to be able to break the same kind of block as youre using for decoration in the base map

nimble helm
#

Like Shears for wool

vale socket
vale socket
#

but you could set any tool to any block

#

or blocks

vale socket
nimble helm
#

But if the map is big enough (UHC run) and I have multiple worlds, setting it up in sections will take a lot of time

vale socket
#

it will certainly take time but i think that may be unavoidable

nimble helm
rough kettle
#

Using a storage for every single block isn’t a good idea

#

NBT can get very laggy

nimble helm
rough kettle
#

but every single block?

vale socket
#

that could work, but it could probably be much easier to make some kind of datapack that saves a far corner and the x, y & z length for a cube of area to copy, as well as a destination corner, to systematically/dynamically grab and paste chunks

rough kettle
#

I would do it in rows

vale socket
#

prob easier

#

but same idea either way

rough kettle
#

so like, all blocks in x=1, then x=2, etc

#

but yeah depends on the shape of the map too

nimble helm
vale socket
rough kettle
#

^^^

vale socket
#

what you COULD do is save the tiles players change, but that would require raycasting, which you wanted to avoid

nimble helm
#

Hmm so clone it is

rough kettle
#

there’s 90K blocks per chunk if you include -64 to 319

vale socket
# nimble helm Hmm so clone it is

you could also use a library such as retina to make raycasting a lot easier, but its up to you and what you find easiest in the end

nimble helm
#

I'll go with clone command

rough kettle
#

but there’s also stuff like tnt explosions, jumping on crops, etc which wouldn’t be captured by the raycast

vale socket
#

yeah, depending on the minigame, for sure

#

raycasting can be fickle 😔

#

fair warning, /clone en masse may also be laggy, but i think its a lesser evil in this case

nimble helm
rough kettle
#

basically noting is as laggy as NBT operations AND macros

vale socket
#

yeahhh

#

lol

nimble helm
#

I replied to the wrong message

vale socket
#

except like, summoning structure locating maps

rough kettle
#

you could do one /clone per tick. That way it’s not rspecially laggy but it will take like a couple of seconds to clone the entire map

vale socket
#

yeah

#

only other issue is loading things in

#

if players could be not loading the map and its copy in, youd have to use forceload commands

#

ofc thatd be an issue with the nbt too

nimble helm
#

Structures could be better ? since I don't have to create an extra copy ?

vale socket
vale socket
#

ig id wait for sila or someone else to answer that

rough kettle
#

structures should be just as easy tbh

#

more difficult to make changes to such as if you want to add chests or stuff to it, since you’d have to save the structures again each time

#

but a bonus is that you won’t have to forceload the copy of the map

nimble helm
#

Hmm it's for my minigame server and that wouldn't take a lot of time so it's fine