-
-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add InventoryHolder -> Location converter (#6747)
* add holder -> location converter * clean up despite failure ------ Co-authored-by: Moderocky <admin@moderocky.com>
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
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
16 changes: 16 additions & 0 deletions
16
src/test/skript/tests/regressions/6424-inventory-holder-location.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,16 @@ | ||
test "inventory holder location": | ||
set {_b} to the block at spawn of world "world" | ||
set {_prev} to type of block at {_b} | ||
broadcast {_prev} | ||
|
||
set block at {_b} to a chest | ||
set {_inv} to inventory of {_b} | ||
set {_holder} to holder of {_inv} | ||
|
||
set {_a-loc} to location of {_holder} | ||
set {_b-loc} to location of {_b} | ||
|
||
# clean up first in case assert fails | ||
set block at {_b} to {_prev} | ||
|
||
assert {_a-loc} is {_b-loc} with "holder location differs from block location" |