-
-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Trial Spawners in Spawner Type expression. (#7008)
* Initial Commit * tiny change * tiny change * make tests not fail * remove delete change mode, causing issues * suggested changes --------- Co-authored-by: Moderocky <[email protected]> Co-authored-by: Patrick Miller <[email protected]>
- Loading branch information
1 parent
af202ac
commit cf1658e
Showing
2 changed files
with
94 additions
and
50 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
23 changes: 23 additions & 0 deletions
23
src/test/skript/tests/syntaxes/expressions/ExprSpawnerType.sk
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,23 @@ | ||
test "spawner type": | ||
set block at event-location to spawner | ||
set {_block} to block at event-location | ||
|
||
set spawner type of {_block} to zombie | ||
assert spawner type of {_block} is zombie with "Spawner type was set to a Zombie" | ||
|
||
reset spawner type of {_block} | ||
assert spawner type of {_block} is pig with "Spawner type was not reset correctly" | ||
|
||
set block at {_block} to air | ||
|
||
test "trial spawner type" when running minecraft "1.21": | ||
set block at event-location to trial spawner | ||
set {_block} to block at event-location | ||
|
||
set spawner type of {_block} to zombie | ||
assert spawner type of {_block} is zombie with "Spawner type was set to a Zombie" | ||
|
||
reset spawner type of {_block} | ||
assert spawner type of {_block} is pig with "Spawner type was not reset correctly" | ||
|
||
set block at {_block} to air |