Skip to content

Comparators - add default comparators#7251

Merged
Moderocky merged 3 commits into
SkriptLang:dev/featurefrom
ShaneBeee:feature/default-comparators
Dec 18, 2024
Merged

Comparators - add default comparators#7251
Moderocky merged 3 commits into
SkriptLang:dev/featurefrom
ShaneBeee:feature/default-comparators

Conversation

@ShaneBeee
Copy link
Copy Markdown
Contributor

Description

This PR aims to add default comparators to Registry/Enum ClassInfos.
Skript in the past has had issues comparing 2 of the same object, ex:
if biome at player = plains:
Skript get's upset:

[12:09:09 INFO]: Line 18: (test.sk)
[12:09:09 INFO]:     Can't compare a biome with a biome
[12:09:09 INFO]:     Line: if biome at player = plains:

Rather than registering a comparator for each and every Registry/Enum entry, this allows them to dynamically register.


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

@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.10 labels Dec 15, 2024
@Efnilite Efnilite added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Dec 18, 2024
@Moderocky Moderocky merged commit 3e8b011 into SkriptLang:dev/feature Dec 18, 2024
@ShaneBeee ShaneBeee deleted the feature/default-comparators branch December 18, 2024 19:20
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
Comparators - add default comparators for Registry/Enum class infos

Co-authored-by: Moderocky <admin@moderocky.com>
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. 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.

4 participants