Chisel-Team/ConnectedTexturesMod

[Bug] Glowmaps that are not layer0 in an item model do not render.

Closed this issue · 1 comments

Due to this unfortunate issue, the only way to make an item glow is to add the glowmap to the first layer, cut holes in the original texture, and then add it to the second layer. Example is depicted below.
totem layers

I believe this was caused by CTM getting confused with layers and item models. It could sometimes reorder quads even when no layer was explicitly set, and cause quads to be emitted multiple times (since the action for "no layer" was to emit all quads for all layers - and quads with no layer exist in all layers).

I've changed the CTM parser (technically a breaking change but I doubt it will really affect anyone) to default to null instead of SOLID layer, meaning item texture metadata can emulate vanilla textures by leaving out the field. I've also made sure that CTM models return only distinct quads, and for good measure added some caching to the generation of those distinct lists.