Skip to content

Fix(MM_Choke): Properly checks for null before calling setAir on lastTarget#21

Merged
Dream-Master merged 1 commit into
GTNewHorizons:masterfrom
Worive:ticking-entity
Sep 5, 2025
Merged

Fix(MM_Choke): Properly checks for null before calling setAir on lastTarget#21
Dream-Master merged 1 commit into
GTNewHorizons:masterfrom
Worive:ticking-entity

Conversation

@Worive

@Worive Worive commented Sep 5, 2025

Copy link
Copy Markdown

When the mob is applying to the player the drowning damage, and the player somehow has a way to reflect the damage to the mob and kills it, the mob will die and set lastTarget as null. That's the only possible situation in which I can think this crash can happen, but i did not manage to reproduce it, as thorns does not apply.

Also added a check for mob is dead to avoid triggering updateAir twice.

Fixes GTNewHorizons/GT-New-Horizons-Modpack#18374

…Target.

If when applying to the player the drowning damage, the player somehow has a way to reflect the damage to the mob and kills it, the mob will die and set lastTarget as null.

Fixes GTNewHorizons/GT-New-Horizons-Modpack#18374
@Dream-Master Dream-Master requested a review from a team September 5, 2025 15:00
@sisyphussy sisyphussy added the safe for stable Bugfix with low break chance for patch releases label Sep 5, 2025
@Dream-Master Dream-Master merged commit 21d8757 into GTNewHorizons:master Sep 5, 2025
1 check passed
@Worive Worive deleted the ticking-entity branch September 5, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe for stable Bugfix with low break chance for patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ticking entity

3 participants