Epic Fight

Epic Fight

13M Downloads

[1.18.2 Forge 40.1.74] "this.weaponAttackMotions" is null (sorta fixed but then new error); possible incompat with Pokecube AIO

DeadlyAccurate opened this issue ยท 16 comments

commented

I would really love to salvage both mods in my modpack, so I'm giving this one a shot, as crazy as it may be.

OK, so I mentioned this on Discord, but yesterday during testing, I would randomly get a freeze then CTD, even though I wasn't in combat mode and wasn't even looking at anything but the ground. Here's the crash report.

https://pastebin.com/Qj9GAeCp

My husband is a programmer, though not in Java, so he took a look at the source code and figured a possible fix would be to add on line 97 (the line above the error)

if (this.weaponAttackMotions == null) { return null;}

We rebuilt the mod, put it in the pack, removed the Curseforge one, and I started testing again. All seemed great for quite a while. I was fighting zombies and spiders and skeletons without issues. Then I started walking toward a Pokecube village, and it froze and crashed again. With a new error.

https://pastebin.com/SKqwqrz4

Of course, I don't know for sure that Pokecube AIO is the incompatible mod, but I ran a test by making a fighting pit and spawning in zombies with various mods' weapons and objects in hand in an attempt to get a crash, and it never did.

These are the versions of the two mods I'm using.

pokecube-aio-1.18.2-3.17.3.jar
EpicFight-18.3.3-beta.jar

What other information would help in debugging this? I've pulled Pokecube for now, but I really want to add it to my pack if possible.

commented

Hey there, so afaik you are using 40.1.74 forge version, could you try and downgrade the forge version to recommended one (40.1.73)

commented

Sure, I can try that. I think I started getting this problem on 40.1.73 and upgraded to see if that would fix it, but at this point I honestly don't remember.

commented

Could you provide the datapack? Well, the solution you've suggested was kinda first-aid. I'll take a look at the logic that can cause the crash by comparing your datapack.

commented

Still the same crash. Unfortunately, I can't figure out which mod it's happening with. I no longer think it's Pokecube. It might be Apotheosis's Adventure Module (the named special mobs that spawn), but the only reason I can say that is during one of my pack tests, I started adding in mods one at a time and it happened shortly after adding Apotheosis. But I couldn't recreate it even after hours of running around. (Also, I've tried both with and without the Apotheosis compat datapack).

I can go hours without any issues and then it'll suddenly happen when I step outside of my base with nothing around. I've tried mods like Not Enough Crashes to see if it would report the mods it suspects is the issue, but I've had no luck. If I get any more information, I'll let you know.

commented

Datapack? Do you mean the change we made to the code? We just took the source code, added if (this.weaponAttackMotions == null) { return null;} to line 97 of HumanoidMobPatch.java and rebuilt the mod and replaced it in the pack. Here's the rebuilt .jar
https://drive.google.com/file/d/13gZVgN_5CKwZ4EzlCBjfhioDcSTDSaA-/view?usp=sharing

If you meant the Apotheosis datapack, I got that off your Discord. https://discord.com/channels/955784714264932362/964701095056257034/1010259026531057745

commented

Haven't you set any datapack regarding custom entity? The last log you put on the pastebin tells that you're using entity datapack. (The Null pointer exception at CustomHumanoidMobPatchProvider). Or has pokecube-aio made their own datapack to make compatible their entities with epicfight?

commented

I had a couple of datapacks for Epic Fight. One for Guard Villagers and one for Tinker's Construct. The others were for mob heads, player heads, multiplayer sleep, and armor statues.

Would the Armor Statues datapack be considered an entity pack?
https://vanillatweaks.net/share#GN7Bfj

commented

I mean this one: https://github.com/Yesssssman/epicfightmod/wiki/Custom-entity-datapack

Isn't there any datapack folder name that starts with epicfight_mobpatch?

commented

I used the datapacks I got off your Discord (Epic_Construct for the Tinker's integration; guardepic for Guard Villagers; and Epic_Apotheosis for Apotheosis integration).

https://discord.com/channels/955784714264932362/964701095056257034/1013500158077575318
https://discord.com/channels/955784714264932362/964701095056257034/996768180972290108
https://discord.com/channels/955784714264932362/964701095056257034/1010259026531057745

But no other Epic Fight datapacks.

commented

Ok, the crash report says your data pack tried to make custom AI for zombies but loaded incorrectly somewhat reason. Can you still reproduce this crash?

commented

Sure, I'll do that tonight and post the next crash report to pastebin once it's happened.

commented

It took a lot of hours before it finally crashed, but it eventually did. I walked into a building in the overworld, and the game froze, then crashed to desktop. I wasn't in combat, and I think it was daylight. I was in creative mode (other times I've been in survival).

https://pastebin.com/RPeEd3eE

Does the error message mean that a creature is spawning with something in its hand that the mod is struggling to recognize? I've tested spawning in zombies with all of Epic Fight's weapons, with Tinker's weapons, and with vanilla's. I've given a zombie a random item (like dirt). I've summoned Apotheosis bosses and set them to fight Guard Villagers. I've done that for hours and never had a problem. Zombies even handle dual-wielding daggers without issue.

I'm trying to think of what other information might be helpful, but I can't come up with anything. The hours that can pass before a crash makes it super hard to try to reproduce the issue since I can't easily remove a mod, test, remove a mod, test, etc.

commented

Sorry for late reply, but could you post the full log file? It's under /.minecraft/logs folder named debug.log

commented

My more recent modpack tests were without Epic Fight, and I don't have a debug.log file in that folder, so I'll have to re-add the mod and retest. It may be a while before I can provide the file, though; house purchase + AirBnb move is taking up a lot of time.

commented

Fixed in 18.3.5

commented

Ok I simply fixed it with first proposal. But still please provide me a debug.log file if you like, to enhance the wiki page by specifying misused example.