FirstAid icon indicating copy to clipboard operation
FirstAid copied to clipboard

Prevent player is missing a damage model crash

Open dudebehinddude opened this issue 2 years ago • 1 comments

This pr should the player is missing a damage model crash if you heal the same tick that you died. This can be easily replicated if you have regeneration, are at full health, but take enough damage to your head or body that it instantly kills you. (I have a mod installed that does makes campfires give you regeneration, so this was very easy for me to find). As a note, I don't think this fixes the NBT issue that I have seen (and I don't know how to replicate that).

dudebehinddude avatar Jul 22 '23 04:07 dudebehinddude

This is a great fix! @ichttt Are there any plans for merging this soon?

TqLxQuanZ avatar Aug 14 '23 05:08 TqLxQuanZ

If ichitt doenst merge this im just forking their mod myself and redistributing it with the fix as this isue make sthe game unplayable.

Untrustedlife avatar Jun 21 '24 04:06 Untrustedlife

I’ve successfully fixed the bug and compiled the JAR file. I’ll be uploading it to CurseForge after testing it myself. Honestly it was super easy barely an inconveniance thanks to the gradle build file already in the repo.

Since the mod is under the GPL license, there should be no issue with me uploading it. @ichttt, I’ve only fixed it for version 1.19.2 because that’s what my modpack uses. I plan to explore more and see what else I can learn about modding Minecraft.

By the way, I’ve already made a mod that has 59k downloads, so this should be fun!

Untrustedlife avatar Jun 21 '24 05:06 Untrustedlife

Okay! After testing, this fix alone didn't fix the bug, the function on line 145 also needs to be updated. I did this on my fork. I also fixed another issue. https://github.com/Untrustedlife/FirstAidCrashFix That is probably why this fix was never merged. After updating both line 145 and this, i finally can play without crashes

Untrustedlife avatar Jun 21 '24 06:06 Untrustedlife

I'm so sorry this took ages for me to acknowledge, at the time I wanted to reproduce it locally, but I did not have the time to look into it and then lost track of it. I still did not reproduce it, but looking at the latest stack traces, this fix seems correct, so I'll just merge it. Thanks!

ichttt avatar Jul 01 '24 17:07 ichttt

I'm so sorry this took ages for me to acknowledge, at the time I wanted to reproduce it locally, but I did not have the time to look into it and then lost track of it. I still did not reproduce it, but looking at the latest stack traces, this fix seems correct, so I'll just merge it. Thanks!

A reliable method was to inflict significant self-damage, apply some bandages, and then drown yourself. I was consistently crashing when I did that.

Untrustedlife avatar Jul 08 '24 18:07 Untrustedlife