Skip to content

Make CondIsEnchanted look for exact enchants by default, with optional greater/equal to. #7816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dev/feature
Choose a base branch
from

Conversation

sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Apr 20, 2025

Description

Current behavior means if {_x} is enchanted with sharpness 2 succeeds if {_x} has sharpness 5. This is a bit unintuitive imo, so this PR changes the default so that no longer succeeds. Only sharpness 2 would count. is enchanted with sharpness still matches all levels. To have the old behavior, you now use is enchanted with sharpness 2 or better.

It's a breaking change, but a beneficial one in my opinion.

Also fixes a double-evaluation bug with the condition.


Target Minecraft Versions: any
Requirements: none
Related Issues: #4517

@sovdeeth sovdeeth added enhancement Feature request, an issue about something that could be improved, or a PR improving something. breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) labels Apr 20, 2025
@sovdeeth sovdeeth requested a review from a team as a code owner April 20, 2025 18:39
@sovdeeth sovdeeth requested review from Pikachu920 and erenkarakal and removed request for a team April 20, 2025 18:39
@sovdeeth sovdeeth changed the title Make CondIsEnchanted look for exact enchants be default, with optional greater/equal to. Make CondIsEnchanted look for exact enchants by default, with optional greater/equal to. Apr 20, 2025
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label May 15, 2025
@erenkarakal erenkarakal added feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. and removed needs reviews A PR that needs additional reviews labels May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) enhancement Feature request, an issue about something that could be improved, or a PR improving something. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants