Skip to content

[1.20.1] Wrapping a CTM model crashes due to missing initialization #250

@XFactHD

Description

@XFactHD

Description

When another mod (in this case FramedBlocks) wraps a baked CTM model in ModelEvent.ModifyBakingResult after CTM has wrapped the original model, then CTM's ModelEvent.BakingCompleted handler will no longer be able to recognize the CTM models and therefore won't initialize the internal data structures of the CTM model which leads to a crash once the quads of the CTM model (i.e. the one held by the other mod's model) are requested: https://gist.github.com/XFactHD/c3a995ead285fda288a75b6e7da26978

If this wrapping "chain" happens the other way around (i.e. the CTM model is the outer-most one) and the other mod's model is dynamic, then the model instead breaks visually due to the caching in the CTM model: XFactHD/FramedBlocks#629

I have not looked into newer versions (primarily 1.21) yet but I suspect the same issue will apply there as well.

Versions

Minecraft: 1.20.1
Forge: 47.1.3
CTM: 1.20.1-1.1.10
FramedBlocks: 9.4.1 with a modified mods.toml to ensure CTM loads before FramedBlocks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions