Skip to content

Conversation

@Warriorrrr
Copy link
Member

Closes #13172

When an effect of the same type is added to an entity, we construct a new MobEffectInstance-instance and update that to see if any property of the existing effect can be overriden by the new effect. This works well, except for that the update method also has one extra side effect, namely updating the hidden effect, which doesn't count as overriding anything.

This PR adds some extra logic to check if the new effect should be added as a hidden effect if it isn't already being overriden, so that no effect gets lost.

Tested by drinking a long regeneration potion and a short regeneration 2 potion, regardless of which potion was drank first the longer effect always returned after the short one ended.

@Warriorrrr Warriorrrr requested a review from a team as a code owner October 11, 2025 17:58
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Oct 11, 2025
@Warriorrrr Warriorrrr added type: bug Something doesn't work as it was intended to. scope: parity labels Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: parity type: bug Something doesn't work as it was intended to.

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

Lower-level potion effects are incorrectly discarded if a higher-level effect is active first

1 participant