defeatedcrow / HeatAndClimateMod

The Mod for Minecraft 1.9.4+
54 stars 18 forks source link

StackOverflow exception when player shoots a mob with Twilight Forest's Ice Bow, related to HAC 1.12.2 #269

Closed RisingInIris2017 closed 1 year ago

RisingInIris2017 commented 1 year ago

Forge version: 14.23.5.2860

HAC Mod version: 1.12.2-3.7.1

HAC Lib version: 1.12.2-3.7.0

How to reproduce:

  1. Install HAC mod and lib. Version info is provided above.
  2. Twilight Forest (TF) mod version is 3.10.1013.
  3. Equip a certain type of HAC's jewel. The player reported this issue to me has some difficulties in figuring out which type of jewel is needed, but I will try to find that for you.
  4. Use TF's Ice Bow to shoot a mob.
  5. Game crashes, both client and SMP server.

Log related: Client crash-report: https://pastebin.ubuntu.com/p/VCWHs5rWgT/ SMP Server crash-report: https://pastebin.ubuntu.com/p/yTSQKxd4QC/ There are some Chinese characters in my mods' file names - they are of no importance. If they cause any display difficulties, sorry for that.

I have not tested this issue on the latest version for 1.12.2 of HAC yet, and I have no idea about whether it is fixed or not. So I post this issue for help. If any other information is needed, please let me know and I will provide it for you as soon as possible. Thanks to you in advance!

defeatedcrow commented 1 year ago

Thank you for your report. This error is probably happening here. https://github.com/defeatedcrow/HeatAndClimateMod/blob/1988bbf80eda63abdce62820155215d844eec669/main/java/defeatedcrow/hac/magic/event/MagicCommonEvent.java#L113

This is one of the effects of the black badge, and the event is triggered by "a player or mob shooting a projectile at a target". The black badge camouflages the archer and redirects attacks from other mobs to prevent the archer from becoming a revenge target.

This error appears to be caused by a ticking loop caused by a player with a black badge (probably) being self-harmed by a projectile. (There are two reasons: this projectile attack didn't have a process to prevent self-harm, and the effect of this badge didn't have a countermeasure against self-harm.) This error is still present in the latest version.

I found the cause, but I'm currently developing 1.19, and the 1.12 development environment is broken, so I can't fix it. (The environment has been evacuated to the sub-laptop, but due to corruption, package builds are no longer possible.) Therefore, there are currently no plans to release a fixed version. I'm sorry.

RisingInIris2017 commented 1 year ago

Thank you for your report. This error is probably happening here.

https://github.com/defeatedcrow/HeatAndClimateMod/blob/1988bbf80eda63abdce62820155215d844eec669/main/java/defeatedcrow/hac/magic/event/MagicCommonEvent.java#L113

This is one of the effects of the black badge, and the event is triggered by "a player or mob shooting a projectile at a target". The black badge camouflages the archer and redirects attacks from other mobs to prevent the archer from becoming a revenge target.

This error appears to be caused by a ticking loop caused by a player with a black badge (probably) being self-harmed by a projectile. (There are two reasons: this projectile attack didn't have a process to prevent self-harm, and the effect of this badge didn't have a countermeasure against self-harm.) This error is still present in the latest version.

I found the cause, but I'm currently developing 1.19, and the 1.12 development environment is broken, so I can't fix it. (The environment has been evacuated to the sub-laptop, but due to corruption, package builds are no longer possible.) Therefore, there are currently no plans to release a fixed version. I'm sorry.

Oh, thanks for such a detailed explanation! Your kind-hearted help is appreciated all the same. Wish you a nice day!