Forgive me if this not an EntityCulling issue, i'm only opening it here since it looks like the CullTask.run is the start of the stacktrace and I assume it runs on an another thread than the game thread and so might be the culprit, but there's multiple mods in stacktrace so if this not an EntityCulling issue feel free to close this.
[10:57:19] [CullThread/ERROR]: LivingEntityRenderer.addLayer called on wrong thread
java.lang.Exception
at knot//net.minecraft.client.renderer.entity.LivingEntityRenderer.wrapMethod$dkk000$modernfix$handleOffThreadLayerAdd(LivingEntityRenderer.java:2529)
at knot//net.minecraft.client.renderer.entity.LivingEntityRenderer.addLayer(LivingEntityRenderer.java)
at knot//net.minecraft.client.renderer.entity.HorseRenderer.<init>(HorseRenderer.java:40)
at knot//org.embeddedt.modernfix.entity.EntityRendererMap$RenderConstructor.load(EntityRendererMap.java:40)
at knot//org.embeddedt.modernfix.entity.EntityRendererMap$RenderConstructor.load(EntityRendererMap.java:31)
at knot//com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3556)
at knot//com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2307)
at knot//com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2180)
at knot//com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2071)
at knot//com.google.common.cache.LocalCache.get(LocalCache.java:3985)
at knot//com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4006)
at knot//com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4946)
at knot//org.embeddedt.modernfix.entity.EntityRendererMap.get(EntityRendererMap.java:74)
at knot//org.embeddedt.modernfix.entity.EntityRendererMap.get(EntityRendererMap.java:20)
at knot//net.minecraft.client.renderer.entity.EntityRenderDispatcher.bo$getOtherRenderer(EntityRenderDispatcher.java:549)
at knot//net.minecraft.client.renderer.entity.EntityRenderDispatcher.getRenderer(EntityRenderDispatcher.java:535)
at knot//dev.tr7zw.entityculling.NMSCullingHelper.getCullingBox(NMSCullingHelper.java:45)
at knot//dev.tr7zw.entityculling.CullTask.cullEntities(CullTask.java:126)
at knot//dev.tr7zw.entityculling.CullTask.run(CullTask.java:79)
at java.base/java.lang.Thread.run(Thread.java:1516)
[10:57:19] [CullThread/INFO]: Loaded entity minecraft:horse
bo$getOtherRenderer is from BadOptimizations:
https://github.com/imthosea/BadOptimizations/blob/5de4a3ad4299909178d8995dc0bc80626be48d44/common/src/main/java/me/thosea/badoptimizations/mixin/renderer/entity/MixinEntityRendererDispatcher.java#L39-L51
The handleOffThreadLayerAdd is from ModernFix:
https://github.com/coredex-source/ModernFix---mVUS/blob/420d70f5fb501a5a1ac6cee2ca096c2b91a52a9a/src/main/java/org/embeddedt/modernfix/common/mixin/safety/LivingEntityRendererMixin.java#L22-L34
The rest seems vanilla code and EntityCulling code.
The relevant versions are, MC 26.1.2, EntityCulling 1.10.5, ModernFix mVUS 5.27.19, BadOptimizations 2.4.1.
The error prints a few times right after you join a world and otherwise does not occur during gameplay again per my testing. It could be related to the ModernFix option "Dynamic entity renderers" but I have not tested this.
It seems like a possible fix would be to just do what ModernFix does inside within EntityCulling - doing a isSameThread check and calling mc.schedule otherwise, as seen in the ModernFix mixin.
To clarify, this does not cause a crash and I just wanted to report in case it wasn't known. It seems ModernFix just prints the stacktrace so mod authors can fix it in their side instead of relying of ModernFix's mixin fix.
Forgive me if this not an EntityCulling issue, i'm only opening it here since it looks like the CullTask.run is the start of the stacktrace and I assume it runs on an another thread than the game thread and so might be the culprit, but there's multiple mods in stacktrace so if this not an EntityCulling issue feel free to close this.
bo$getOtherRenderer is from BadOptimizations:
https://github.com/imthosea/BadOptimizations/blob/5de4a3ad4299909178d8995dc0bc80626be48d44/common/src/main/java/me/thosea/badoptimizations/mixin/renderer/entity/MixinEntityRendererDispatcher.java#L39-L51
The handleOffThreadLayerAdd is from ModernFix:
https://github.com/coredex-source/ModernFix---mVUS/blob/420d70f5fb501a5a1ac6cee2ca096c2b91a52a9a/src/main/java/org/embeddedt/modernfix/common/mixin/safety/LivingEntityRendererMixin.java#L22-L34
The rest seems vanilla code and EntityCulling code.
The relevant versions are, MC 26.1.2, EntityCulling 1.10.5, ModernFix mVUS 5.27.19, BadOptimizations 2.4.1.
The error prints a few times right after you join a world and otherwise does not occur during gameplay again per my testing. It could be related to the ModernFix option "Dynamic entity renderers" but I have not tested this.
It seems like a possible fix would be to just do what ModernFix does inside within EntityCulling - doing a isSameThread check and calling mc.schedule otherwise, as seen in the ModernFix mixin.
To clarify, this does not cause a crash and I just wanted to report in case it wasn't known. It seems ModernFix just prints the stacktrace so mod authors can fix it in their side instead of relying of ModernFix's mixin fix.