Skip to main content

Class: SectionTracker

Owns the static (block-anchored) side of the light registry: which emitters exist per chunk section, individually or aggregated into proxy records for dense fields like lava. Rescans are whole-section and diff against what is registered, so an untouched emitter keeps its handle — and with it its selection hysteresis — across neighboring edits.

Constructors​

constructor​

• new SectionTracker(registry, chunkSize, maxHeight, subChunks): SectionTracker

Parameters​

NameType
registryLightSourceRegistry
chunkSizenumber
maxHeightnumber
subChunksnumber

Returns​

SectionTracker

Accessors​

trackedSectionCount​

• get trackedSectionCount(): number

Returns​

number

Methods​

releaseAll​

▸ releaseAll(): void

Returns​

void


releaseSection​

▸ releaseSection(key): void

Parameters​

NameType
keystring

Returns​

void


rescanSection​

▸ rescanSection(key, chunk, sectionY, table): void

Scan one section of a loaded chunk and reconcile the registry with what is actually there. Safe to call for load, edit, and re-load alike.

Parameters​

NameType
keystring
chunkScannableChunk
sectionYnumber
tableBlockProfileTable

Returns​

void


sectionKey​

▸ sectionKey(cx, cz, sectionY): string

Parameters​

NameType
cxnumber
cznumber
sectionYnumber

Returns​

string


trackedSections​

▸ trackedSections(): IterableIterator<string, any, any>

Returns​

IterableIterator<string, any, any>