gr8pefish / IronBackpacks

A Minecraft mod that adds portable storage in the form of tiered backpacks with modular upgrades.
GNU General Public License v3.0
60 stars 33 forks source link

Conflict with Roboticraft and at least 2 backpack mods. #242

Closed AlphaSparqy closed 6 years ago

AlphaSparqy commented 6 years ago

Issue Description:

The issue isn't with your mod, it runs fine with 359 other mods I'm playing around with.

The issue is with the mod Roboticraft (https://minecraft.curseforge.com/projects/roboticraft) and IronBackpacks, but it's getting a nearly identical NPE with WearableBackpacks, as well.

What happens:

Modified instance to just 3 mods, for this crash-report

https://pastebin.com/1iTYSp3d

java.lang.NullPointerException: Initializing game at gr8pefish.ironbackpacks.item.ItemUpgrade.func_77667_c(ItemUpgrade.java:36)

What you expected to happen:

IronBackpacks code causing NPE, only with Roboticraft installed.

@Override
public String getUnlocalizedName(ItemStack stack) {
    BackpackUpgrade backpackUpgrade = getUpgrade(stack);
    if (backpackUpgrade.isNull())
        return super.getUnlocalizedName(stack);

    return "upgrade.ironbackpacks." + backpackUpgrade.getIdentifier().getResourcePath();
}

WearableBackpacks code causing NPE, only with Roboticraft Installed.

@Override
public String getUnlocalizedName() {
    // Just use the item's unlocalized name for this block.
    return MiscUtils.getItemFromBlock(this).getUnlocalizedName();

}

It would seem, that the .getUnlocalizedNamed() is the commonality?

Affected Versions (Do not use "latest"):

Thank you!

I have also posted this on the WearableBackpacks Git issues, where the Roboticraft author had started the issue.

https://github.com/copygirl/WearableBackpacks/issues/80

TehNut commented 6 years ago

237 he is calling that shit way too early.

AlphaSparqy commented 6 years ago

Ya, I should have searched deeper before posting, only after I saw the previous ones.

My bad.