Hello there I will need help maybe some one know is it possible to get list of chunks in worldguard region or wordedit selection. Third option will be getting them between 2 location by for loop Think is what I am doing is changing blocks with packets and you can do that just per chunk so I need to run task for every chunk in region to do that Thanks
Getting the chunks in a region is essentially a matter of coordinate manipulation, I don’t thunk that’s something WorldEdit would bundle into their API natively. The minimum chunk a region occupies is its minX/16 and minZ/16 and the maximum chunk is maxX/16 and maxZ/16. Just use a double for loop to go through each chunk X and Z between the two ranges.
You can also find the 4 corners of you region after that you can easily using a for loop find the remaining X / Z of every chunk in between
You need to use 4 calculations. Obtain the region details (Psuedo Code) chunksUsed = Chunk(roundDown(region.Xmin / 16), roundDown(region.Zmin / 16)) to Chunk(roundDown(region.Xmax / 16, roundDown(region.Zmax / 16))