DarknessLib is a library mod with functions for handling light calculations and built-in support for the most common mods with dynamic light sources. Since this is a library mod, it does little on its own, but other mods can add support for it to reduce the need to create the same code.
This library provides the following:
- Functions for checking relative light levels (including things like being on a block of soul sand).
- Support for dynamic light sources from Atomic Strykers, Optifine, and Smooth Entity Light.
- Functionality works on a player-to-player basis (if enabled, any player using one of the mentioned dynamic light mods will add this light to their overall lighting instead of the client saying it is light and the server saying it is not), and there is a customizable list where you can add additional portable light sources (if they have not been detected yet, as the library has built-in functionality to attempt to determine light sources from all registered blocks).
- A built-in list of vehicles that mods relying on the library can check before checking the light level (as both minecarts and boats obscure the light level when you are inside).
- IMC support for mods to add portable light sources and vehicles to the relevant lists within the mod (or you can open an issue tracking request with the modid and the path to the vehicle entity class, and I will include it in the internal list).


