Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If ConArm is installed, cancelling materials crashes #8

Open
phantamanta44 opened this issue Apr 17, 2021 · 1 comment
Open

If ConArm is installed, cancelling materials crashes #8

phantamanta44 opened this issue Apr 17, 2021 · 1 comment

Comments

@phantamanta44
Copy link

In particular, this code in ModuleConarm:

TinkerRegistry.addMaterialStats(material,
    new CoreMaterialStats(head.durability / 30, head.attack * 2.2F),
    new PlatesMaterialStats(handle.modifier, handle.durability / 17, toughness),
    new TrimMaterialStats(extra.extraDurability / 16));

...will always NPE, since the head, handle, and extra will be null if the material registration is cancelled.
This can be fixed by either null-checking here, or by swapping the order of material and stat registrations (e.g. by swapping the two lines here).

@RCXcrafter
Copy link
Owner

I don't think this is a big deal since it only happens if you disable the material with an external mod instead of using the materialis config to disable it but I'll fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants