Minecraftforge: Support selectively disabling Creeper explosion EntityAreaEffectClouds

Created on 3 Feb 2018  路  3Comments  路  Source: MinecraftForge/MinecraftForge

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.

Stale

Most helpful comment

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.

All 3 comments

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.

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!

Closing because the suggestion from @DaedalusGame worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bs2609 picture bs2609  路  3Comments

DaedalusGame picture DaedalusGame  路  3Comments

Tamaized picture Tamaized  路  3Comments

williewillus picture williewillus  路  3Comments

tterrag1098 picture tterrag1098  路  3Comments