Skip to content

Deprecate boolean expressions#8619

Open
Phill310 wants to merge 46 commits into
SkriptLang:dev/featurefrom
Phill310:deprecate-boolean-expressions
Open

Deprecate boolean expressions#8619
Phill310 wants to merge 46 commits into
SkriptLang:dev/featurefrom
Phill310:deprecate-boolean-expressions

Conversation

@Phill310

@Phill310 Phill310 commented May 2, 2026

Copy link
Copy Markdown
Contributor

Problem

We have moved away from Boolean Expressions in favor of effect+condition pairs.

Solution

I looked through the expressions to find boolean expressions which could be deprecated and replaced. I then created effects and conditions to replace the functionality of the deprecated expressions.

Testing Completed

Added a test for each effect:

  • EffAI.sk
  • EffGlowing.sk
  • EffGravity.sk
  • EffProjectileCriticalState.sk (I wasn't sure if you could test to see if a warning was sent. If there is a way it might be nice to add this to the test when the projectile isn't an arrow or trident)

Supporting Information

  • ExprAI: Created effect, moved+updated condition
  • ExprFlightMode: Already has effect + condition, deprecated expression
  • ExprGlidingState: Entity Gliding #8588
  • ExprGlowing: Created effect and condition
  • ExprGravity: Created effect + condtion
  • ExprProjectileCriticalState: Creates effect + condition

Please let me know if I missed any or if some of these don't count.

Completes: none
Related: none
AI assistance: none

@Phill310 Phill310 requested a review from a team as a code owner May 2, 2026 08:41
@Phill310 Phill310 requested review from APickledWalrus and erenkarakal and removed request for a team May 2, 2026 08:41
@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label May 5, 2026

@APickledWalrus APickledWalrus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good so far! Nice work.

Comment thread src/main/java/ch/njol/skript/expressions/ExprAI.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/entity/elements/effects/EffAI.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/entity/elements/effects/EffAI.java Outdated
@Phill310 Phill310 requested a review from APickledWalrus May 8, 2026 23:36
@Phill310

Phill310 commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

I would love some extra feedback on the gravity condition. I am not super happy with the current syntax. I was thinking about adding something along the lines of %entities% are affected by gravity and/or %entities% experience gravity.

I was also wondering if we should mark ExprFlightMode for deprecation

Phill310 and others added 4 commits May 9, 2026 11:50
@Phill310 Phill310 requested a review from Efnilite May 9, 2026 19:07
Comment thread src/main/java/ch/njol/skript/expressions/ExprAI.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprFlightMode.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprGlowing.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprGravity.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprProjectileCriticalState.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprGravity.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprProjectileCriticalState.java Outdated
@Phill310 Phill310 requested a review from Absolutionism June 10, 2026 01:29

@Absolutionism Absolutionism left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with these last changes

Phill310 and others added 2 commits June 9, 2026 23:44
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>

@APickledWalrus APickledWalrus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great so far! It might be worth supporting some kind of toggle variant for the effect patterns. This is something that is currently supported for these boolean expressions through EffToggle IIRC.

Comment thread src/main/java/ch/njol/skript/expressions/ExprAI.java Outdated
Comment thread src/test/skript/tests/bukkit/entity/EffAi.sk
@Phill310 Phill310 requested a review from APickledWalrus June 15, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants