Support and follow development
Phosphor is a Minecraft mod aiming to save your CPU cycles and improve performance by optimizing one of Minecraft's most inefficient areas-- the lighting engine. It works on both the client and server, and can be installed on servers without requiring clients to also have the mod.
The following graph demonstrates the reduction in generation time for a world (with a render distance of 20) for various vanilla and modded dimensions. However, please note that the improvements extend beyond generation time, as well.
The inclusion of modded dimensions above does not imply endorsement of this mod by the mod developer(s), and only exist for comparison sake.
Sounds too good to be true? Phosphor has already shipped enabled by default in the very widely known Aether II mod. Check it out here, and maybe considering installing it today!
What is this mod?
Phosphor significantly improves the performance of Minecraft's lighting engine by implementing a handful of optimizations while also fixing many long-standing lighting engine bugs. These optimizations can bring significant improvements to the amount of time it takes to generate a Minecraft world.
For the technically inclined, expand the spoiler below to see what exactly we do to improve performance.
- The code responsible for propagating light changes through the world has been completely rewritten to be significantly more efficient than the vanilla implementation.
- Light updates are postponed until the regions they touch are queried. This allows light updates for blocks to be batched together and reduces the number of duplicated scheduled light updates for an area significantly. Light update batching provides an unbelievable reduction to world generation time for modded dimensions like the The Twilight Forest with lots of light-occluding foliage while still providing significant improvements for vanilla generation and other modded dimensions.
- Skylight propagation on the vertical axis has been fixed to take into account incoming skylight from neighboring chunks, fixing a variety of lighting issues created during world generation and operations involving large volumes of blocks.
- Light data is now sent to the client for empty chunk sections when it is non-trivial (i.e. not completely lit by skylight.) This fixes a few bugs where light would appear incorrect in empty sections of the sky.
- Through fixing various errors in vanilla's lighting engine implementation, many expensive checks previously performed when placing or relighting blocks are now skipped, reducing the overhead of these operations significantly.
While Phosphor is still in a beta stage, mod incompatibilities and bugs are rare, and for the most part can be considered stable. The next release of Phosphor (version 0.3.0) will represent a stable release candidate which will eventually be promoted a stable build on CurseForge.
What is this mod not?
While this is a significant improvement of vanilla's lighting engine implementation, it does not make any changes to how the light model in Minecraft works. In layman's terms, this mod does not change how light is rendered (except where bugs are fixed) or add new features to Minecraft, allowing it to work without the mod being installed on the client/server. The fixes and optimizations provided by Phosphor are specific to improving the lighting engine.
Phosphor is fully compatible with OptiFine, including the Dynamic Lights feature implemented by OptiFine.
DynamicLights (the standalone Forge mod) will not function correctly with Phosphor installed. Please see the relevant GitHub issue for more information.
Phosphor has been tested to work with the latest versions of SpongeForge, but you must use the latest releases of SpongeForge (1.12.2-2768-7.1.6-RC3639 or newer) and the latest releases of Phosphor (0.2.0+.) Phosphor will refuse to run if an older version of SpongeForge is being used. Additionally, you must disable asynchronous lighting in Sponge's configuration file or you will suffer degraded performance.
Due to a bug in NotEnoughIDs, you must use the latest releases of NotEnoughIDs (126.96.36.199 or newer) or you will suffer silent world corruption issues. Phosphor will refuse to run if an older version of NotEnoughIDs is being used.
Other Forge mods
Currently, I'm not aware of incompatibility issues with any other Forge mods! Phosphor shouldn't cause conflicts with mods which do not modify the game's lighting engine. If you run into an compatibility issue, please report it on the project's issue tracker.
This is a free and open-source project on CurseForge, and as such-- of course you can include it in your modpack! While not required, it's much appreciated if you link back to Phosphor's project page and Patreon in your mods list or credits page.
This mod would not have been possible without the research done by Mathe172 and PhiPro95. Parts of this mod are inspired and/or based off their previous work.
Please use the issue tracker linked at the top of the page to report bugs, crashes, and other issues. The Curseforge comments section is not the place to report these kinds of problems.