A client-side dynamic lighting API mod.
💡 What is Lucent?
Lucent is a dynamic lighting mod and API designed with configurability in mind. This mod will impact your FPS, but many steps have been taken to reduce the performance cost without overhauling Minecraft's rendering engine.If the mod reduces your FPS too heavily, check the config file for its many settings. The most impactful options are to reduce the lightRefreshRate and to disable smoothBlending.
Video
Mod Conflicts
- Optifine: It will work, although some dynamic lighting will behave strangely if Optifine's dynamic lighting is enabled.
- Sodium: Many parts of Lucent will break with Sodium installed, and it is not recommended.
Mod Support
Dynamic Lighting:
- NOTE: Some of these mods may not be released for 1.17.1 yet, and support has simply been added ahead of time
- Lava Monster
- Nethercraft
- Blue Skies
- Miner's Helmet
- Quark
Other
- Catalogue's GUI
🤷 FAQ - Frequently Asked Questions
Doesn’t Optifine do this already?
There is dynamic lighting in Optifine, however it is NOT open-source. Lucent’s dynamic lighting has been completely written from scratch and is open-source, aimed for modpacks and developers that want to work with Lucent’s API for smooth dynamic lighting. Optifine CANNOT be distributed on CurseForge, so for those creating modpacks, who want dynamic lighting right out of the box, Lucent is great for modpack creators.🌐 Translate Lucent - Help break the language barrier!
All translators are credited here. Thank you to everyone who helps make this mod accessible!| Flag | Language | Translators |
|---|---|---|
| Deutsch | m.strongamov, Tigerentenclan, A1403, leodesta6 | |
| English (New Zealand) | Jesterguy | |
| Español (México) | Vamacher0n | |
| 日本語 (Nihongo) | ろむちん/Romuchin, poyoyotyan | |
| Português (Brasil) | Antoniowmattos | |
| Русский (Russkiy) | MrPomidorchik, tchepelkin2017 | |
| Türkçe (Türkiye) | ygzbys, gux |
🤚 Support: If you have questions or any issues with our mods, read the FAQ! You can also either submit an issue on the issue tracker, or come into our Discord server where we can help you!
All Versions
+ Add Version## General Updates
- Improved performance with dynamic lighting
- Added a config screen
- Fixed dynamic lighting not working with Sodium
- Light interpolation does not work, and a one-time warning will pop up if Sodium is installed
##
LightLevelProvider- Heavily refactored to remove generic typing and improve class structuring
getLightLevel(RegistryAccess, T)has been refactored togetLightLevel(Level, BlockPos, Object)Objectcan be safely cast to the required class if needed usingLightLevelProvider.Source.ITEM_STACK,LightLevelProvider.Source.ENTITY,LightLevelProvider.Source.DATA_COMPONENT_GETTER. Source validation is done during registry- Some providers have been updated or renamed. The naming convention is as follows: light level providers that should take a value from the object in question, and then determine a light value from it through some calculation, should be prefixed with
map_. This signifies that the actual value on the object is in use. All other light level providers will simply return a value. if_nbt->nbt- No longer saves NBT as a String. Instead saved as a tag in the json.
- Now has a
required_componentslist. Only saves NBT to get the light level if all required data components are present. match_nbt->map_nbt- Combined other
match_nbtsubtypes into this - Has a
source_typefield, accepting the following: number: Uses the number value directly (default)item: Obtains the item's default dynamic lightingblock: Obtains the block's light levelfluid: Obtains the fluid's light levelentity: Obtains the entity's default dynamic lighting- Now has a
required_componentslist. Only saves NBT to get the light level if all required data components are present. match_nbt_item-> Removedmatch_nbt_block-> Removedmatch_nbt_fluid-> Removedmatch_block->blockmatch_enchantment->map_enchantmentmatch_armor_trim->armor_trim- May now optionally include the trim pattern as
trim_pattern - New Providers
map_block_state- Takes the block state item component and extracts a light level from it. Data is entered as a map of property names and light levels
data_component- Uses the supplied
predicateto match the data components on the item or entity - Dynamic lighting can now be registered to tags of items and entities
- Formatted as
"id": "#c:rods/blaze"
## Emissive Textures
- Removed block emissive textures
- Emissive armor trim materials may now be defined with tags
## Mod Support
- Added support for the following:
- Curios
- Trinkets Updated
- Artifacts
- Aether II
- Aether
- Aether Treasure Reforging
- Glacidus
## Backend Changes
- The dynamic lighting engine is now ran per world
- This should enable for easier compat with mods like Immersive Portals
- The dynamic lighting engine no longer runs in its own thread in a super hacky way
- It instead runs during client level tick as a background task
- If calculations could not be finished in time for the tick to end, it will wait for the next tick to apply them
- Added
RegistryAccessto the various plugin registry methods, passed into the variousXRegistryclasses
## LucentHooks -> LucentApi
- Updated methods to work with the new backend
## LucentCapability
- Contains various
AttachmentTypesaccessed from ClientLevel that can be used to obtain dynamic lighting. - These attachments contain generic java functions that can be accessed regardless of if Lucent is in your development workspace.
## Plugin Refactor
registerArmorTrimTextureLightings(ArmorTrimLightingRegistry)->registerArmorTrimEmissivity(ArmorTrimEmissivityRegistry)- The
@LucentPluginannotation is now responsible for storing run priority and the owner mod ID - The owner mod ID still has a method for the purpose of internal helper methods
- The motivation for this change was primarily for internal reasons, however it allows for a plugin class to be validated without initializing the class
``
java
@LucentPlugin
public final class LavaMonsterPlugin implements ILucentPlugin
{
@Override
public String ownerModID()
{
return "lava_monster";
}
}
`
### New Format
`java
@LucentPlugin(modid = LavaMonsterPlugin.MODID)
public final class LavaMonsterPlugin implements ILucentPlugin
{
static final String MODID = "lava_monster";
@Override
public String modid()
{
return MODID;
}
}
``## General Lighting Updates
- Falling blocks, block display, and item display entities can now emit light based on the block or item they represent.
## API Updates
- Added
List<ItemStack> ILucentPlugin.gatherEquippedItems(Entity) - Return a list of all equipped items on the entity that could determine dynamic lighting.
- Internally used to handle armor, held items, and item frames. Other mods could use this to handle additional inventory slots.
- Ported to NeoForge 1.20.4
## Fixes
- Chunks are no longer marked for render update on the dynamic lighting thread, instead scheduling it to happen during the render thread.
## Fixes
- Modified the Sodium/Rubidium warning to not care about Embeddium since it works with that.
- Fixed dynamic lighting not working with Optifine.
- Players in spectator no longer emit light... How'd I miss that?
Ported to 1.20.1.
## Fixes
- Fixed a lighting flicker that could occur when placing blocks that let light through in an area lit by dynamic lighting.
- Entities emitting light no longer flicker when they move.
## Additions
- Added the ability for resource packs to make armor with trims emit light based on the trim material.
- New light level provider for items:
lucent:match_armor_trim: [Read on the wiki here.](https://gitlab.com/modding-legacy/lucent/-/wikis/resource_packs/dynamic_lighting/Items) - Added the ability for armor trim textures to be emissive.
- Located in the
lucent_data/emissive_textures/armor_trimfolder in resource packs. - Does not work with Optifine.
- [Read on the wiki here.](https://gitlab.com/modding-legacy/lucent/-/wikis/resource_packs/emissive_textures/Armor-Trims)
## Changes
- Moved block texture emission from
lucent_data/emissive_texturetolucent_data/emissive_textures/blockin resource packs.
## Plugins
- Added
ILucentPlugin.markSectionDirty(SectionPos) - Fired when a chunk section should be marked for render updates due to Lucent. Override this to run your own logic, and return
trueto cancel Lucent's behavior. - Does nothing and returns
falseby default.
- Please Read**
This version is accessible on Modrinth primarily for modpack purposes. However, please be aware that this version is no longer supported or updated.
We recommend players to update to the latest version to ensure optimal performance and access to ongoing support. Thank you for your understanding.
- Changelog:**
- First release