Interface LightUpdatedVisual
- All Superinterfaces:
SectionTrackedVisual,Visual
- All Known Implementing Classes:
AbstractBlockEntityVisual
A visual that listens to light updates.
If your visual moves around in the level at all, you should use TickableVisual or DynamicVisual,
and poll for light yourself along with listening for updates. When your visual moves to a different section, call
SectionTrackedVisual.SectionCollector.sections(it.unimi.dsi.fastutil.longs.LongSet).
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.engine_room.flywheel.api.visual.SectionTrackedVisual
SectionTrackedVisual.SectionCollector -
Method Summary
Modifier and TypeMethodDescriptionvoidupdateLight(float partialTick) Called after visual construction and when a section this visual is contained in receives a light update.Methods inherited from interface dev.engine_room.flywheel.api.visual.SectionTrackedVisual
setSectionCollector
-
Method Details
-
updateLight
void updateLight(float partialTick) Called after visual construction and when a section this visual is contained in receives a light update.Even if multiple sections are updated at the same time, this method will only be called once.
The implementation is free to parallelize calls to this method, as well as execute the plan returned by
DynamicVisual.planFrame()simultaneously. It is safe to query/update light here, but you must ensure proper synchronization if you want to mutate anything outside this visual or anything that is also mutated withinDynamicVisual.planFrame().
-