Skip to main content

Module light

Module light 

Source
Expand description

Light storage primitives used by chunk and world lighting.

Modules§

cache 🔒
data_layer 🔒
packet 🔒
propagation 🔒
queue 🔒
section_storage 🔒
sky_propagation 🔒
sky_sources 🔒
storage 🔒
work_gate 🔒
Scheduling gate for light work cache windows.
workset 🔒

Structs§

BlockLightPropagationContext
ScalableLux-style block-light propagation over scoped Steel light caches.
BlockLightUpdateResult
Sections whose visible block-light data changed during a scoped update.
CachedLightBlock
Cached section slot and local nibble index for one block.
CachedLightChunk
Cached chunk slot plus its ScalableLux cache role.
CachedLightSection
Cached section slot for one section position.
ChunkLightData
Chunk-owned block and sky light storage.
ChunkLightEmptinessMapLengthError
Error returned when a chunk light emptiness map has the wrong length.
ChunkLightLayerStorage
Per-layer chunk-owned light storage.
ChunkSkyLightSources
Per-chunk cache of the lowest skylight source edge in each X/Z column.
DataLayer
Packed 4-bit light values for one 16x16x16 light section.
DataLayerLengthError
Error returned when packed light data has the wrong length.
LightCacheLayout
ScalableLux cache-window layout for chunk, section, and nibble arrays.
LightCacheSetupChunks
Iterator over chunks scanned by ScalableLux cache setup.
LightChunkReadCache
Flat cached chunk reads for one scoped lighting operation.
LightChunkSectionSlots
Iterator over one inner cached chunk’s vanilla light-section slots.
LightChunkSlotArray
Optional value slots for ScalableLux’s 5x5 chunk cache arrays.
LightDirectionSet
ScalableLux propagation direction bitset.
LightDirectionSetIter
Iterator over a LightDirectionSet in ScalableLux propagation order.
LightLayerEdit
Scoped mutable light edits for one layer and one workset.
LightPropagationQueue
Array-backed FIFO used for vanilla light propagation work.
LightPropagationQueues
Vanilla’s separate increase and decrease propagation queues.
LightQueueEntry
Vanilla’s packed light-propagation queue entry.
LightQueueFlags
ScalableLux state flags stored in the top three queue-entry bits.
LightSectionEmptinessChange
Real chunk-section emptiness transition that must be applied before block checks.
LightSectionRange
Inclusive/exclusive vertical range of light sections for a level.
LightSectionRangeError
Error returned when a world height cannot produce a valid light-section range.
LightSectionReadCache
Flat cached chunk-section reads for block-state access during lighting.
LightSectionSlotArray
Optional value slots for ScalableLux’s section/nibble cache arrays.
LightUpdateNotificationCache
Section-slot notification flags used while publishing visible light updates.
LightWorkset
Scoped chunk admission for one light operation.
PackedLightBlockPos
ScalableLux packed block position used in light propagation queue entries.
PackedLightPropagationQueue
Array-backed FIFO used for ScalableLux packed light propagation entries.
PackedLightPropagationQueues
ScalableLux’s separate packed increase and decrease propagation queues.
PackedLightQueueEntry
ScalableLux packed light-propagation queue entry.
QueuedLightUpdate
One typed light propagation queue item.
SkyLightPropagationContext
ScalableLux-style sky-light propagation over scoped Steel light caches.
SkyLightUpdateResult
Sections whose visible sky-light data changed during a scoped update.

Enums§

BlockLightChunkEdgeChecks
Whether chunk block-light generation must validate edge consistency.
BlockLightPropagationContextError
Error returned when a block-light propagation context is built from mismatched caches.
LightAxisDirection
ScalableLux axis direction order used by packed light propagation queues.
LightCacheChunkScope
ScalableLux cache role for a cached chunk column.
LightCacheSetupRadius
ScalableLux setup-cache radius.
LightLayer
Vanilla light layer kind.
LightSection
Chunk-owned section presence and data state.
LightSectionData
Storage representation for one present light section.
LightWorksetSetupError
Error returned when a scoped light workset cannot acquire required chunks.
SkyLightChunkEdgeChecks
Whether chunk sky-light generation must validate edge consistency.
SkyLightPropagationContextError
Error returned when a sky-light propagation context is built from mismatched caches.

Constants§

CHUNK_COLUMN_COUNT 🔒
CHUNK_EDGE 🔒
DATA_LAYER_BLOCK_COUNT
Number of blocks in a light section.
DATA_LAYER_EDGE
Number of blocks along one edge of a light section.
DATA_LAYER_SIZE
Number of packed bytes in a light section.
LIGHT_BLOCKED
Opacity returned when a block face fully blocks light.
LIGHT_CACHE_CHUNK_SLOTS
Number of chunk columns in one light-engine cache window.
LIGHT_CACHE_DIAMETER
Horizontal cache width and depth used by ScalableLux light propagation.
LIGHT_CACHE_RADIUS
Horizontal cache radius used by ScalableLux light propagation.
LIGHT_CACHE_SECTION_RADIUS
Horizontal radius where ScalableLux populates section and nibble cache data.
LIGHT_SECTION_PADDING
Vanilla stores one extra light section below and above the build height.
MAX_LIGHT_LEVEL
Maximum light value stored by vanilla lighting.
MIN_LIGHT_OPACITY
Minimum opacity used while propagating vanilla light.
NEGATIVE_INFINITY 🔒

Functions§

build_chunk_light_update_packet
Builds protocol light-update data from chunk-owned light sections.
build_chunk_light_update_packet_for_sections
Builds protocol light-update data for the changed sections of one chunk column.
check_block_light_chunk_edges
Validates already-loaded block-light chunk edges without resetting sections.
check_sky_light_chunk_edges
Validates already-loaded sky-light chunk edges without resetting sections.
force_load_block_light_chunk
Force-synchronizes block-light sections for an already-lit loaded chunk.
force_load_sky_light_chunk
Force-synchronizes sky-light sections for an already-lit loaded chunk.
get_light_block_into
Returns vanilla’s LightEngine.getLightDampeningInto result.
get_light_opacity
Returns vanilla’s simple opacity for light propagation.
has_different_light_properties
Returns whether vanilla must re-check lighting after a block-state change.
light_face_occludes
Returns whether the selected state faces fully occlude light.
light_occlusion_shape
Returns the occlusion shape vanilla lighting uses for a block state.
load_block_light_chunk
Loads already-persisted block light and validates chunk edges without resetting sections.
load_sky_light_chunk
Loads already-persisted sky light and validates chunk edges without resetting sections.
propagate_block_light_changes
Runs ScalableLux-style block-light propagation for changed blocks in a scoped workset.
propagate_block_light_changes_with_empty_sections
Runs block-light propagation after applying real section emptiness transitions.
propagate_block_light_chunk
Seeds and propagates block light for the center chunk of a scoped workset.
propagate_sky_light_changes
Runs ScalableLux-style sky-light propagation for changed blocks in a scoped workset.
propagate_sky_light_changes_with_empty_sections
Runs sky-light propagation after applying real section emptiness transitions.
propagate_sky_light_chunk
Seeds and propagates sky light for the center chunk of a scoped workset.
propagate_sky_light_chunk_without_edge_checks
Seeds and propagates sky light for the center chunk without edge checks.