BuiltBrokenModding / AI-Improvements

General adjustment to MC's AIs to improve performance and functionality
MIT License
42 stars 7 forks source link

[1.7.10] Crash on startup when Terrafirmacraft and aiimprovement are installed #32

Closed quentin452 closed 2 years ago

quentin452 commented 2 years ago

crash report :

crash-2022-10-11_07.19.57-client.txt

mods list :

1.7.10-TerraFirmaCraft-0.79.30.925 AIImprovements-1.7.10-0.0.1b8

bl4ckscor3 commented 2 years ago

Sorry, we no longer update this mod for 1.7.10, so this won't be looked into.

DarkGuardsman commented 2 years ago
java.lang.NullPointerException: Initializing game
    at com.bioxx.tfc.Entities.Mobs.EntitySkeletonTFC.superAddRandomArmor(EntitySkeletonTFC.java:411)
    at com.bioxx.tfc.Entities.Mobs.EntitySkeletonTFC.func_82164_bB(EntitySkeletonTFC.java:317)
    at com.bioxx.tfc.Entities.Mobs.EntitySkeletonTFC.func_110161_a(EntitySkeletonTFC.java:446)
    at com.builtbroken.ai.improvements.overrides.instances.EntityOverrideArrowAttack.loadEntitySettings(EntityOverrideArrowAttack.java:75)
    at com.builtbroken.ai.improvements.overrides.EntityOverride.loadSettings(EntityOverride.java:51)
    at com.builtbroken.ai.improvements.overrides.OverrideHandler.init(OverrideHandler.java:49)
    at com.builtbroken.ai.improvements.AIImprovements.postInit(AIImprovements.java:104)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Looks to be a bug outside of our mod. Our logic is trying to override arrow attack but looks like TFC's implementation is depending on something missing or not ready for invoking. Since we follow vanilla's logic it can be assumed TFC has changed things enough to cause issues.

Its been a few years since I wrote the code for the 1.7 version... but there may be a config to disable the arrow replace logic.

DarkGuardsman commented 2 years ago

Line of code that triggers the above if anyone wants to PR the change.

https://github.com/BuiltBrokenModding/AI-Improvements/blob/1.7/src/main/java/com/builtbroken/ai/improvements/overrides/instances/EntityOverrideArrowAttack.java#L75

Our team may not fix the issue but can deploy a new version if someone else wants to add a try-catch or other fix. Even though it is not our issue it can be captured on our side to prevent game crash.