dragonfly
dragonfly copied to clipboard
Area cloud effect does not behave like vanilla
Eg: In this implementation the cloud lasts only about 15 seconds, when in fact it should last about 30 seconds.
I have described some of these behaviors in: https://github.com/pmmp/PocketMine-MP/pull/5276#issuecomment-1236198936
In this implementation the cloud lasts only about 15 seconds, when in fact it should last about 30 seconds.
Where did you get this from? The duration is always set to 30 seconds. https://github.com/df-mc/dragonfly/blob/967faf17ce46564cbf57893dc078a739c361bdb5/server/entity/area_effect_cloud.go#L36
Yeah, I don't think this issue is valid — the logic seems to match up with the PR you linked. Is there anything in specific that is incorrect based off of vanilla, aside from the duration (which also is correct by the looks of it)?
Where did you get this from? The duration is always set to 30 seconds.
Did you play-tested it?
https://user-images.githubusercontent.com/57236932/189500543-05352acd-8e98-4e6e-a80f-4a470358e863.mp4
Is there anything in specific that is incorrect based off of vanilla, aside from the duration (which also is correct by the looks of it)?
- Area effect clouds only trigger updates every five tick, it should be
10. - If the potion effect is instantaneous
ReapplicationDelayis must be set to0(Actualy it would be applied every 10 ticks due to the above mentioned)
This information is obtained through play-tests and analysis of the NBT in vanilla.
About duration after debugging I found that the problem was on the client side, because it requires certain metadata to calculate the radius itself.
AREA_EFFECT_CLOUD_RADIUS => (float) Initial radius
AREA_EFFECT_CLOUD_SPAWN_TIME => (int) world time when it spawned
AREA_EFFECT_CLOUD_RADIUS_PER_TICK => (float) radiusGrowth
AREA_EFFECT_CLOUD_RADIUS_CHANGE_ON_PICKUP => (float) radiusOnUse
AREA_EFFECT_CLOUD_PICKUP_COUNT => (int) Times it has been pick up
(It is likely that their names do not match because they were obtained from pocketmine)
I believe a lot of this can actually be avoided @IvanCraft623 by disabling the client-side behaviour of the cloud. Geyser does this, actually - see https://github.com/GeyserMC/Geyser/blob/3d66d2790f3a03ca8bafa7ce1cc6429ad9ab7a18/core/src/main/java/org/geysermc/geyser/entity/type/AreaEffectCloudEntity.java#L53.