TransWikia.com

Area Effect Clouds: RadiusOnUse/DurationOnUse

Arqade Asked by tatiematie on June 24, 2021

In my testing the radius and duration of Area Effect Clouds can be altered when entities come into contact with them, but only if the Cloud has a potion effect to apply to the entity and the effect is of a certain group of effects. For some reason Clouds with effects like Thick and Mundane can be summoned even though those effects cannot be applied to a player.

I want to alter the duration or the radius (either or, doesn’t matter) of an Area Effect Cloud when it touches an entity without applying an effect to that entity, is this possible?

One Answer

There are two main way to do this: The "forwards" way and the "backwards" way.

The "forwards" way would be to not use the properties of the AEC at all and instead emulate it with commands by doing calculations based on the radius of the cloud and then modifying the cloud's radius based on a player being inside it or not. That's pretty complicated.

The "backwards" way is to give the AEC an effect that doesn't normally happen (like "luck") and then to simply remove that effect from every player whenever they have it. So just this in a repeating command block or ticking function:

/effect clear @a luck

If you want to get really fancy, you can put that command into a function that is called by a hidden advancement with a corresponding effects_changed (archive) trigger, that should be the solution with the best performance.

Answered by Fabian Röling on June 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP