-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡️ feat(bs.block): add callback at the end of fill operations (#340)
- Loading branch information
Showing
5 changed files
with
55 additions
and
12 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
16 changes: 16 additions & 0 deletions
16
modules/bs.block/data/bs.block/function/fill/events/on_finished.mcfunction
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 @@ | ||
# ------------------------------------------------------------------------------------------------------------ | ||
# Copyright (c) 2025 Gunivers | ||
# | ||
# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). | ||
# | ||
# This source code is subject to the terms of the Mozilla Public License, v. 2.0. | ||
# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
# Conditions: | ||
# - You may use this file in compliance with the MPL v2.0 | ||
# - Any modifications must be documented and disclosed under the same license | ||
# | ||
# For more details, refer to the MPL v2.0. | ||
# ------------------------------------------------------------------------------------------------------------ | ||
|
||
$$(on_finished) |
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
21 changes: 21 additions & 0 deletions
21
modules/bs.block/data/bs.block/test/fill/on_finished.mcfunction
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,21 @@ | ||
# ------------------------------------------------------------------------------------------------------------ | ||
# Copyright (c) 2025 Gunivers | ||
# | ||
# This file is part of the Bookshelf project (https://github.com/mcbookshelf/Bookshelf). | ||
# | ||
# This source code is subject to the terms of the Mozilla Public License, v. 2.0. | ||
# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
# Conditions: | ||
# - You may use this file in compliance with the MPL v2.0 | ||
# - Any modifications must be documented and disclosed under the same license | ||
# | ||
# For more details, refer to the MPL v2.0. | ||
# ------------------------------------------------------------------------------------------------------------ | ||
|
||
data modify storage bs:in block.fill_block set value {block:"minecraft:stone",from:"~ ~ ~",to:"~ ~1 ~",limit:1,on_finished:"setblock ~ ~ ~ minecraft:bookshelf"} | ||
function #bs.block:fill_block | ||
assert block ~ ~ ~ minecraft:stone | ||
assert not block ~ ~1 ~ minecraft:stone | ||
await delay 1t | ||
assert block ~ ~1 ~ minecraft:bookshelf |