[Bug]: Massive log spam 'Failed to modify unbaked model'
mpustovoi opened this issue ยท 14 comments
Mod Loader (Required)
Forge
Minecraft Version(s) (Required)
1.20.1
Mod Version(s) (Required)
v8.1.23
Other Mods Involved (Required)
No
Notes (Required)
I suppose it's some kind of compatibility issue, but I personally can't figure out the reason.
I have a ton of different mods, and I don't remember exactly when this problem appeared. Maybe about half a month ago.
This makes logging difficult, since there are about 280 thousand lines in the latest.log
with the same error from your mod.
[<time>] [Worker-ResourceReload-2/ERROR] [Puzzles Lib/]: Failed to modify unbaked model
java.lang.ClassCastException: null
latest.log (Required)
I just tried it on a minimal setup:
With or without FerriteCore, there are many
ModelBakery
errors in the logs: https://mclo.gs/hfYVr2j#L3.I ran it on a clean instance without configs.
For this setup, how do diagonal walls look in-game? Are they fine, or do you see the purple/black missing model?
I also tried without FerriteCore in my modpack. Minecraft took 2-3 times longer to run. The length of the log file has grown to 1.3 million lines. It's full of errors with apparently every wall block and its states. First error as an example:
[<time>] [Worker-ResourceReload-2/ERROR] [Puzzles Lib/]: Failed to modify unbaked model java.lang.IllegalArgumentException: Cannot set property EnumProperty{name=east, clazz=class net.minecraft.world.level.block.state.properties.WallSide, values=[none, low, tall]} to true on Block{deeperdarker:sculk_grime_brick_wall}, it is not an allowed value at net.minecraft.world.level.block.state.StateHolder.m_61124_(StateHolder.java:130) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?] at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.setBlockStateValue(MultiPartTranslator.java:59) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5] at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.convertBlockState(MultiPartTranslator.java:50) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5] at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.convertAnyBlockState(MultiPartTranslator.java:43) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5] at fuzs.diagonalblocks.client.handler.DiagonalModelHandler.onModifyUnbakedModel(DiagonalModelHandler.java:53) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5] at fuzs.puzzleslib.impl.client.event.ForgeClientEventInvokers.lambda$registerLoadingHandlers$6(ForgeClientEventInvokers.java:80) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23] at fuzs.puzzleslib.api.event.v1.core.ForgeEventInvokerRegistry.lambda$register$0(ForgeEventInvokerRegistry.java:25) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23] at fuzs.puzzleslib.impl.event.ForgeEventInvokerRegistryImpl$ForgeEventInvoker.lambda$register$1(ForgeEventInvokerRegistryImpl.java:725) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23] at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%23128!/:?] at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%23128!/:?] at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%23128!/:?] at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%23128!/:?] at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:114) ~[javafmllanguage-1.20.1-47.3.7.jar%231002!/:?] at jdk.internal.reflect.GeneratedMethodAccessor19.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at net.minecraftforge.client.ForgeHooksClient.mdfe4e85$modernfix$lambda$postNamespacedKeySetEvent$0$0(ForgeHooksClient.java:1372) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?] at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?] at net.minecraftforge.fml.ModList.forEachModContainer(ModList.java:223) ~[fmlcore-1.20.1-47.3.7.jar%231001!/:?] at net.minecraftforge.client.ForgeHooksClient.redirect$zfl000$modernfix$postNamespacedKeySetEvent(ForgeHooksClient.java:1367) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?] at net.minecraftforge.client.ForgeHooksClient.onModifyBakingResult(ForgeHooksClient.java:471) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?] at net.minecraft.client.resources.model.ModelManager.m_245476_(ModelManager.java:174) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?] at net.minecraft.client.resources.model.ModelManager.m_246937_(ModelManager.java:89) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?] at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?] at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
I can't send it not in zip because of its 160 MB size. 2024-09-15-1.log.gz
Although, I don't have such lines here:
[<time>] [Worker-ResourceReload-0/ERROR] [Puzzles Lib/]: Failed to modify unbaked model java.lang.ClassCastException: null
And here, can you do another minimal setup with Diagonal Walls + Deeper Darker? (no FerriteCore)
Here is the full file, which weighs about 20 MB:
latest.log
Ideally report this to FerriteCore. Since it works fine in vanilla / without FerriteCore I'd assume it's an issue on their end.
I just tried it on a minimal setup:
With or without FerriteCore, there are many ModelBakery
errors in the logs: https://mclo.gs/hfYVr2j#L3.
I ran it on a clean instance without configs.
I also tried without FerriteCore in my modpack.
Minecraft took 2-3 times longer to run. The length of the log file has grown to 1.3 million lines. It's full of errors with apparently every wall block and its states. First error as an example:
[<time>] [Worker-ResourceReload-2/ERROR] [Puzzles Lib/]: Failed to modify unbaked model
java.lang.IllegalArgumentException: Cannot set property EnumProperty{name=east, clazz=class net.minecraft.world.level.block.state.properties.WallSide, values=[none, low, tall]} to true on Block{deeperdarker:sculk_grime_brick_wall}, it is not an allowed value
at net.minecraft.world.level.block.state.StateHolder.m_61124_(StateHolder.java:130) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.setBlockStateValue(MultiPartTranslator.java:59) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.convertBlockState(MultiPartTranslator.java:50) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.convertAnyBlockState(MultiPartTranslator.java:43) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
at fuzs.diagonalblocks.client.handler.DiagonalModelHandler.onModifyUnbakedModel(DiagonalModelHandler.java:53) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
at fuzs.puzzleslib.impl.client.event.ForgeClientEventInvokers.lambda$registerLoadingHandlers$6(ForgeClientEventInvokers.java:80) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
at fuzs.puzzleslib.api.event.v1.core.ForgeEventInvokerRegistry.lambda$register$0(ForgeEventInvokerRegistry.java:25) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
at fuzs.puzzleslib.impl.event.ForgeEventInvokerRegistryImpl$ForgeEventInvoker.lambda$register$1(ForgeEventInvokerRegistryImpl.java:725) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%23128!/:?]
at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%23128!/:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%23128!/:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%23128!/:?]
at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:114) ~[javafmllanguage-1.20.1-47.3.7.jar%231002!/:?]
at jdk.internal.reflect.GeneratedMethodAccessor19.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at net.minecraftforge.client.ForgeHooksClient.mdfe4e85$modernfix$lambda$postNamespacedKeySetEvent$0$0(ForgeHooksClient.java:1372) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
at net.minecraftforge.fml.ModList.forEachModContainer(ModList.java:223) ~[fmlcore-1.20.1-47.3.7.jar%231001!/:?]
at net.minecraftforge.client.ForgeHooksClient.redirect$zfl000$modernfix$postNamespacedKeySetEvent(ForgeHooksClient.java:1367) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
at net.minecraftforge.client.ForgeHooksClient.onModifyBakingResult(ForgeHooksClient.java:471) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
at net.minecraft.client.resources.model.ModelManager.m_245476_(ModelManager.java:174) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
at net.minecraft.client.resources.model.ModelManager.m_246937_(ModelManager.java:89) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
I can't send it not in zip because of its 160 MB size.
2024-09-15-1.log.gz
Although, I don't have such lines here:
[<time>] [Worker-ResourceReload-0/ERROR] [Puzzles Lib/]: Failed to modify unbaked model
java.lang.ClassCastException: null
Thanks for all you investigations!
So for those errors:
Exception loading blockstate definition: ...
I don't think that's an issue, especially since everything works for you in-game. If I remember correctly this always used to show in-dev and I simply suppressed it, as it's not relevant (the model is added via code later). So I assume the suppression is just not working here, which isn't important enough to look into.
The main issue though I have no clue.
java.lang.IllegalArgumentException: Cannot set property EnumProperty
Since neither Deeper Dark nor FerriteCore on their own are causing it, I'm kind of suspecting a third mod to be responsible.
If you come on our Discord (https://lunapixel.studio/discord, just say hello in #fuzs-projects
) I can send you a test version with a potential fix / workaround.
FerriteCore marked this issue as fixed in their commit: malte0811/FerriteCore@f3a4b3f.
However, I'm still unable to test it.
Given #133 (comment) I decided that the underlying error was not in FerriteCore, since you get similar log spam without it. The part of the issue that is in FerriteCore is that it produces different (and useless) errors when trying to set properties to invalid values, and that is what the commit you linked fixes.