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 special endermen dropping their held block if not killed. #26

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

AbdielKavash
Copy link
Member

@AbdielKavash AbdielKavash commented Nov 2, 2024

Closes GTNewHorizons/GT-New-Horizons-Modpack#17828.

Details: Capturing a mob in a soul vial calls the setDead() method on the entity being captured, which handles cleanup of various data associated with the entity. However, some mods add other functionality to this method, which can be repeatedly triggered by capturing and releasing the same mob in a soul vial.

The vanilla way to prevent this (for example, to stop a large slime from splitting into smaller slimes when removed in this way) is to check whether the entity's health is zero when this method is called. This means that these effects only trigger when the entity actually dies, and not when it is removed from game by other means. I have fixed this for endermen here, and for two other mobs elsewhere:

Heatscar Spider (Natura): GTNewHorizons/Natura#26

MedSlime (Thaumic Horizons): GTNewHorizons/ThaumicHorizons#78

These are the only three cases I could find by an org-wide search that could cause issues if triggered repeatedly, and do not already contain the check for entity health.

@Dream-Master Dream-Master merged commit fd71191 into GTNewHorizons:master Nov 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enderman/Soul Vial Block Duplication Glitch
3 participants