Package com.jozufozu.flywheel.light
Interface LightListener
- All Known Subinterfaces:
TickingLightListener
- All Known Implementing Classes:
AbstractInstance,BellInstance,BlockEntityInstance,ChestInstance,EntityInstance,GPULightVolume,LightVolume,MinecartInstance,ShulkerBoxInstance
public interface LightListener
Implementors of this interface may choose to subscribe to light updates by calling
LightUpdater.addListener(LightListener).It is the responsibility of the implementor to keep a reference to the level an object is contained in.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck the status of the light listener.default voidonLightPacket(int chunkX, int chunkZ) Called when the server sends light data to the client.voidonLightUpdate(net.minecraft.world.level.LightLayer type, ImmutableBox changed) Called when a light updates in a chunk the implementor cares about.
-
Method Details
-
getVolume
ImmutableBox getVolume() -
isListenerInvalid
boolean isListenerInvalid()Check the status of the light listener.- Returns:
trueif the listener is invalid/removed/deleted, and should no longer receive updates.
-
onLightUpdate
Called when a light updates in a chunk the implementor cares about. -
onLightPacket
default void onLightPacket(int chunkX, int chunkZ) Called when the server sends light data to the client.
-