DH and True Darkness custom LightMap

Hello!
So I've been trying to make a kitchensink with True Darkness and DH, but I realised that the DH lod chunks weren't actually dark during the night. So I investigated a bit how True Darkness makes blocks actually dark, and it's modifying the Lightmap. Now I have no background in minecraft's render loop, I do know a bit of openGL though, but since I am not clear enough with the render loop, it doesn't help me too much.

here is where I think True Darkness is hooking up to change the lightmap : https://github.com/grondag/darkness/blob/1.19/common/src/main/java/grondag/darkness/mixin/MixinGameRenderer.java
and here: https://github.com/grondag/darkness/blob/1.19/common/src/main/java/grondag/darkness/mixin/MixinLightTexture.java

From what I understand of reading DH's injections, it's rendering before blocks are rendered, and from what I read, True Darkness injects themselves a bit later... if I understood correctly.

(Can someone sanity check me?)

So are there some things that could be done on either sides to make this work? I don't think I dug up nearly enough info to determine that, but I am limited by my knowledge at the moment. I'll do more reading ofc, but I would appreciate some help towards maybe making a patch (it might be time for me to finally get into proper modding)
GitHub
Hardcore darkness for Fabric mod loader. Contribute to grondag/darkness development by creating an account on GitHub.
GitHub
Hardcore darkness for Fabric mod loader. Contribute to grondag/darkness development by creating an account on GitHub.
Was this page helpful?