Farmer's Delight

Farmer's Delight

77M Downloads

[1.16.5] Texture Reference Chain Error - With Solution

dfontana92 opened this issue ยท 3 comments

commented

Please fill out the template below to describe your issue. Doing so greatly helps us understand what happened!

Description
Texture reference chain errors are thrown when loaded alongside CTM, but the error IS NOT a flaw in CTM as has been claimed on the past several issues opened for this. CTM is exposing an error latent in your mod.

The issue stems from the way that unused parent blocks were exported from BlockBench. There are circular (or null, I suppose) references to textures on these four block models which are all unused in-game and serve only as parents for specific types of pie:

pie.json
pie_slice1.json
pie_slice2.json
pie_slice3.json

Your reference error is here:
"textures": {
"particle": "#top",
"bottom": "#bottom",
"inner": "#inner",
"side": "#side",
"top": "#top"
},

You should not be trying to evaluate bottom, inner, side, and top to themselves. Simply remove these lines and the errors are resolved. Pie objects in-game are unaffected, as you set these textures appropriate in the child block json.

Without CTM installed this error does not actually DO anything, since the generic Pie block model is unused, but it still an error nonetheless.

Steps to reproduce:
Errors are thrown upon game launch

Mod list:
FarmersDelight
CTM

commented

Thanks for clarifying the issue!

Interesting... I wasn't aware of how templates truly worked. I looked at a few which actually did define these circular lines and just sorta copied them over, but turns out they parented other models down the line that simply had no texture definitions (probably because we shouldn't ever be using the template models directly). Sounds like I goofed there.

I'll update these textures and test again later tonight. ๐Ÿ‘

commented

Happy to help.

One little addendum, for some reason the ModelBakery (runs on startup, preps block models) does not like the "Particle" texture in the parent pie models, presumably because #top does not exist in that context. This wasn't an issue for a couple of other mods experiencing this issue with CTM, but alas. The solution is pretty simple, you'll have to move the "Particle" texture declaration into the child Pie models, where #top does exist. That resolved all log errors and pies still displayed correctly in-game after testing last night.

commented

Tested the changes just now, and the log spam is gone - pies look exactly the same.
Issue fixed on commit cd79c7b to develop-0.5, should be out when 0.5 comes out. Thanks once again. ๐Ÿ‘