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

Support selectively disabling Creeper explosion EntityAreaEffectClouds #4724

Closed
ChiriVulpes opened this issue Feb 3, 2018 · 3 comments
Closed
Labels
Stale This request hasn't had an update from the author in a long time.

Comments

@ChiriVulpes
Copy link
Contributor

ChiriVulpes commented Feb 3, 2018

A Creeper which has potion effects, when exploding, will create an EntityAreaEffectCloud with the same effects (with the same duration and everything). So if they have, for example, invisibility which is supposed to last forever, and it explodes near you, you gain invisibility forever.

There is no way to disable this functionality, at the moment. It has been suggested elsewhere to use NBT data (such as {LingeringEffect: 1}). I'm not sure if Forge adds functionality like this, tho, since it's kinda vanilla-ey? Would it make more sense to have an event for creeper explosions, so that it's possible to .cancelLingeringCloud() or something?

It would be really nice to have this functionality regardless of how it's implemented. My mod at the moment summons creatures with random effects which can last however long the end user wants them to, but this is an easy way to get the effects applied to yourself. I'd like to prevent that for my spawned creepers.

@ChiriVulpes ChiriVulpes changed the title Support disabling Creeper explosion EntityAreaEffectClouds Support selectively disabling Creeper explosion EntityAreaEffectClouds Feb 3, 2018
@DaedalusGame
Copy link

this is fishy but since Explosion events can be caught by your mod and Explosions have the source as a field (private, so AT or reflect the field) you could clear the potion effects of creepers (specifically you can remove the potion effects with infinite duration, or only ambient, or whatever you want) when they explode. Since the explosion happens before the cloud is produced this should stop the cloud from being created.

@stale
Copy link

stale bot commented Oct 29, 2018

This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___." or "Here's a screenshot of this issue on the latest version"). Thank you for your contributions!

@stale stale bot added the Stale This request hasn't had an update from the author in a long time. label Oct 29, 2018
@ChiriVulpes
Copy link
Contributor Author

Closing because the suggestion from @DaedalusGame worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale This request hasn't had an update from the author in a long time.
Projects
None yet
Development

No branches or pull requests

2 participants