Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fishing zombie throwing rod while dead #24

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

leumasme
Copy link

Closes GTNewHorizons/GT-New-Horizons-Modpack#17058

EntityFishingZombie uses a different implementation (using onLivingUpdate) for the fishing hook logic than EntityFishingPigZombie and EntityFishingSilverfish.
This is necessary because the base Zombie uses the modern AI Task System, where attackEntity isn't used anymore.
An oversight was made however: attackEntity doesn't get called if the Entity is dead, but onLivingUpdate does.
This causes Fishing Zombies to be able to throw Fishing Rods while dead (in the Dying animation before the entity is deleted).

0031856.mp4

(Note the fishing rod bobber being being thrown after the Zombie is killed. This can still hit and pull players)
image

Just adding a check with isMovementBlocked fixes this (using this function instead of isDead seems to be convention for stopping Mob AI).

@Dream-Master Dream-Master requested a review from a team August 21, 2024 15:14
@Dream-Master Dream-Master merged commit 149c3fc into GTNewHorizons:master Aug 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fishing Zombie can hook players after it dies
3 participants