-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Comparators - add default comparators (#7251)
Comparators - add default comparators for Registry/Enum class infos Co-authored-by: Moderocky <admin@moderocky.com>
- Loading branch information
Showing
3 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
test "registry and enum comparators": | ||
# We're using loops because that is when Skript appears to hate comparing things | ||
# Example errors when Skript doesn't have explicit comparators: | ||
# 'Can't compare a biome with a biome' | ||
# 'Can't compare a attribute type with a attribute type' | ||
|
||
|
||
# Compare registry entries | ||
loop all biomes: | ||
if loop-value = plains: | ||
assert loop-value = plains with "Should be able to compare biomes" | ||
|
||
loop all attribute types: | ||
if loop-value = generic movement speed: | ||
assert loop-value = generic movement speed with "Should be able to compare attribute types" | ||
|
||
# Compare enum entries | ||
loop all teleport causes: | ||
if loop-value = ender pearl: | ||
assert loop-value = ender pearl with "Should be able to compare teleport causes" | ||
|
||
loop all spawn reasons: | ||
if loop-value = jockey: | ||
assert loop-value = jockey with "Should be able to compare spawn reasons" |