You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
injecting at INVOKE would allow the code to be cleaner (since you wouldn't need that flag inside the DynamicTexture class) and would allow distant horizon to inject themselves after the lightmap has been updated (since update doesn't return a value (edit: still true but not relevant) Since you are modifing the data inside the DynamicTexture.upload, DH can't access the local variables inside that context, so INVOKE_ASSIGN injection wouldn't work)
For reference, here is how Distant Horizon gets the lightmap data: https://gitlab.com/jeseibel/minecraft-lod-mod/-/blob/main/forge/src/main/java/com/seibel/lod/mixins/client/MixinLightmap.java
Now I'm not that familiar with the FML and mixins in their context, and I don't know how you would ensure DH reads the lightmap values after True Darkness has set them, but using an aditional flag, and flag check seems wastefull, adding a condition to be checked every time some dynamic texture is updated. So even if that doesn't fix distant horizon compatibility, it would be a (small but still there) performance upgrade imo.
The text was updated successfully, but these errors were encountered:
So True Darkness injects themselves inside DynamicTexture.upload at HEAD;
see here https://github.com/grondag/darkness/blob/1.18/common/src/main/java/grondag/darkness/mixin/MixinDynamicTexture.java#L45
Instead of INVOKE of DynamicTexture.upload in LightTexture.class;
see here https://github.com/grondag/darkness/blob/1.18/common/src/main/java/grondag/darkness/mixin/MixinLightTexture.java#L46 , where <init>* is injected to set a flag to the dynamic texture to make sure it's not invoked for every dynamic texture instance.
injecting at INVOKE would allow the code to be cleaner (since you wouldn't need that flag inside the DynamicTexture class) and would allow distant horizon to inject themselves after the lightmap has been updated (
since update doesn't return a value(edit: still true but not relevant) Since you are modifing the data inside the DynamicTexture.upload, DH can't access the local variables inside that context, so INVOKE_ASSIGN injection wouldn't work)For reference, here is how Distant Horizon gets the lightmap data: https://gitlab.com/jeseibel/minecraft-lod-mod/-/blob/main/forge/src/main/java/com/seibel/lod/mixins/client/MixinLightmap.java
Now I'm not that familiar with the FML and mixins in their context, and I don't know how you would ensure DH reads the lightmap values after True Darkness has set them, but using an aditional flag, and flag check seems wastefull, adding a condition to be checked every time some dynamic texture is updated. So even if that doesn't fix distant horizon compatibility, it would be a (small but still there) performance upgrade imo.
The text was updated successfully, but these errors were encountered: