src/AnvilPacker/Level/RegionReader.cs
/// <summary> Enumerates the NBT tag of all chunks in this region. </summary>
Enumerates the NBT tag of all chunks in this region.
Enumerates the NBT tag of all chunks in this region .
public IEnumerable<(CompoundTag Tag, int X, int Z)> ReadAll()
        {
            foreach (var (loc, i) in _locations.Select((v, i) => (v, i)).OrderBy(e => e.v)) {
                if (IsValidLocation(loc) && Read(loc) is CompoundTag tag) {
                    yield return (tag, i & 31, i >> 5);
                }
            }
        }
public IEnumerable < ( CompoundTag Tag , int X , int Z ) > ReadAll ( ) { foreach ( var ( loc , i ) in _locations . Select ( ( v , i ) => ( v , i ) ) . OrderBy ( e => e . v ) ) { if ( IsValidLocation ( loc ) && Read ( loc ) is CompoundTag tag ) { yield return ( tag , i & 31 , i >> 5 ) ; } } }
Enumerates the NBT tag of all chunks in this region.
Enumerates the NBT tag of all chunks in this region .
//Read chunks sequentially to improve perf on slow medias (HDDs/whatever) //Don't really know how effective this is, hard to test because of caching.