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
| Name | Type |
|---|---|
registry | LightSourceRegistry |
chunkSize | number |
maxHeight | number |
subChunks | number |
Returns
Accessors
trackedSectionCount
• get trackedSectionCount(): number
Returns
number
Methods
releaseAll
▸ releaseAll(): void
Returns
void
releaseSection
▸ releaseSection(key): void
Parameters
| Name | Type |
|---|---|
key | string |
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
| Name | Type |
|---|---|
key | string |
chunk | ScannableChunk |
sectionY | number |
table | BlockProfileTable |
Returns
void
sectionKey
▸ sectionKey(cx, cz, sectionY): string
Parameters
| Name | Type |
|---|---|
cx | number |
cz | number |
sectionY | number |
Returns
string
trackedSections
▸ trackedSections(): IterableIterator<string, any, any>
Returns
IterableIterator<string, any, any>