Skip to content

Add potion support to more entities#8630

Open
APickledWalrus wants to merge 8 commits into
dev/featurefrom
feature/expanded-potion-support
Open

Add potion support to more entities#8630
APickledWalrus wants to merge 8 commits into
dev/featurefrom
feature/expanded-potion-support

Conversation

@APickledWalrus
Copy link
Copy Markdown
Member

Problem

Currently, potion syntax does not support Area Effect Clouds or Arrows (that is, the projectiles themselves, in flight).
This was something I missed in my original rework of Skript's potion syntax.

Solution

I've reworked potion syntax, mainly ExprPotionEffect and ExprPotionEffects, to work with a new provider system designed to make supporting new "potion providers" easy. There are 3 default implementations:

  • LivingEntityProvider
  • ItemTypeProvider
  • EntityProvider
    • This is the new behavior for Arrows/AoE clouds
    • These two classes have the exact same potion API, but no common interface :(
    • I instead made one and created an additional wrapper around those two to reduce duplication

There is also a "NullProvider" which is just a dummy class. Used to avoid excessive null checking for invalid types (which will cause a runtime error if encountered)

image

I've also fixed a small issue where remove all (in ExprPotionEffects) did not properly consider active/hidden effects for living entities.

Testing Completed

In-game testing for new supported providers.
Existing potion test is extremely thorough and did not reveal any issues with the new system.

Supporting Information


Completes: none
Related: none
AI assistance: none

@APickledWalrus APickledWalrus requested a review from a team as a code owner May 5, 2026 20:51
@APickledWalrus APickledWalrus added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label May 5, 2026
@APickledWalrus APickledWalrus added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label May 5, 2026
@APickledWalrus APickledWalrus requested review from Burbulinis and TheMug06 and removed request for a team May 5, 2026 20:51
@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. enhancement Feature request, an issue about something that could be improved, or a PR improving something. needs reviews A PR that needs additional reviews

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant