Skip to content

Commit 6c5d6e5

Browse files
authored
🐛 fix: change variable name in bs.sidebar:create (#301)
1 parent 95fa232 commit 6c5d6e5

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

docs/_templates/changelog/v3.0.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@
2323
### `🎯 bs.hitbox`
2424

2525
- <abbr title="New Features">✨</abbr> **[#285](https://github.com/mcbookshelf/Bookshelf/pull/285)** - Introduced a `#bs.hitbox:is_sized` tag for improved hitbox management.
26+
27+
28+
### `📰 bs.sidebar`
29+
30+
- <abbr title="Bug fix">🐛</abbr> **[#301](https://github.com/mcbookshelf/Bookshelf/pull/301)** Fixed the issue where `bs.sidebar:create` was not functioning correctly.

modules/bs.sidebar/data/bs.sidebar/function/create/create.mcfunction

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ execute unless score #s bs.ctx matches 1 run return run function #bs.log:error {
3434
}
3535

3636
# check that the contents have between 1 and 15 entries
37-
execute store result score #l bs.ctx if data storage bs:ctx _.contents[]
38-
execute unless score #l bs.ctx matches 1..15 run return run function #bs.log:error { \
37+
execute store result score #s bs.ctx if data storage bs:ctx _.contents[]
38+
execute unless score #s bs.ctx matches 1..15 run return run function #bs.log:error { \
3939
namespace: "bs.sidebar", \
4040
path: "#bs.sidebar:create", \
4141
tag: "create", \
42-
message: '[{"text":"The contents must have between 1 and 15 lines (","color":"red"},{"score":{"name":"#l","objective":"bs.ctx"}},{"text":" given)."}]', \
42+
message: '[{"text":"The contents must have between 1 and 15 lines (","color":"red"},{"score":{"name":"#s","objective":"bs.ctx"}},{"text":" given)."}]', \
4343
}
4444

4545
# start the recursion to create each line abort if a line failed
4646
execute as B5-0-0-0-2 run function bs.sidebar:create/recurse/start with storage bs:ctx _
4747
data remove entity @s CustomName
48-
execute if score #l bs.ctx = #i bs.ctx run return 1
48+
execute if score #s bs.ctx = #i bs.ctx run return 1
4949
return run function bs.sidebar:create/recurse/abort with storage bs:ctx _

modules/bs.sidebar/data/bs.sidebar/tags/function/create.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"authors": [
66
"Aksiome"
77
],
8+
"contributors": [
9+
"runoshun"
10+
],
811
"created": {
912
"date": "2023/08/18",
1013
"minecraft_version": "23w32a"

0 commit comments

Comments
 (0)