Astral Sorcery

Astral Sorcery

63M Downloads

[1.12.2] [1.9.0] Incompatibility with Ancient Warfare

wamc2017 opened this issue ยท 7 comments

commented

Hi,

I updated Astral Sorcery today from version 1.8.10 to version 1.9.0 and the game is crashing during the start.

Crashlog: https://gist.github.com/wamc2017/9fc4bdd78b80cb7a367c506db5edbf54

Mods I used to test this issue (no other mods installed):
ancientwarfare-1.12.2-2.6.0.239.jar
astralsorcery-1.12.2-1.9.0.jar
Baubles-1.12-1.5.2.jar
CodeChickenLib-1.12.2-3.1.9.344-universal.jar
forge-14.23.4.2707

I don't know on which side it's easier to fix.

Report on AW issue tracker: P3pp3rF1y/AncientWarfare2#712

Thanks for looking into it. :)

Best regards
wamc

commented

Looks like that is being triggered on the Ancient Warfare side from that trace

commented

I looked into this, and what's going on is two things.

  • AW2 has a capability provider that defines hasCapability as capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY. It also defines getCapability as something that casts the backpack handler to whatever the desired capability is. I'm not sure this is correct, but if you call hasCapability and get the answer no, then you shouldn't, presumably, be calling getCapability.
  • AS has a method in EnchantmentUpgradeHelper that does this:
if(!anyTool.isEmpty() && anyTool.hasCapability(AmuletHolderCapability.CAPABILITY_AMULET_HOLDER, null)) {
     AmuletHolderCapability cap = anyTool.getCapability(AmuletHolderCapability.CAPABILITY_AMULET_HOLDER, null);
...
}

Somehow, that getCapability is being called, despite hasCapability obviously being false. I don't understand why.

Patching AW2 is relatively straightforward, but I'm disturbed that getCapability is being called at all.

commented

Bug was fixed on AWs side: P3pp3rF1y/AncientWarfare2@875ae00

Don't know if this issue should stay open until the AW update is out (to avoid dupes) or not?

commented

I'll leave it open at least through the weekend, that way people can see this comment thread

commented

I've got a similar issue, but I do not have Ancient Warfare, and I do not have Noppes custom NPCs.

Happens when updating from 1.8.5 to 1.9.0.
Forge version 14.23.4.2704
FTB Revelation 1.8.0 (with additional mods and updated forge)

Log: https://gist.githubusercontent.com/MrFastZombie/b6a00572c63fc77337390c29861cdd9f/raw/2f07afdc0b1334f3501015730799422daaea6efa/latest.txt

EDIT: Will move to separate ticket

commented

That should have it's own ticket, since it's not the same as the above.

commented

AW version 1.12.2-2.6.1.251 is now available, which includes this fix.