diff --git a/docs/_templates/changelog/v3.0.0.md b/docs/_templates/changelog/v3.0.0.md index 8ae8a7bded..0c2669fcd0 100644 --- a/docs/_templates/changelog/v3.0.0.md +++ b/docs/_templates/changelog/v3.0.0.md @@ -23,3 +23,8 @@ ### `🎯 bs.hitbox` - **[#285](https://github.com/mcbookshelf/Bookshelf/pull/285)** - Introduced a `#bs.hitbox:is_sized` tag for improved hitbox management. + + +### `📰 bs.sidebar` + +- 🐛 **[#301](https://github.com/mcbookshelf/Bookshelf/pull/301)** Fixed the issue where `bs.sidebar:create` was not functioning correctly. diff --git a/modules/bs.sidebar/data/bs.sidebar/function/create/create.mcfunction b/modules/bs.sidebar/data/bs.sidebar/function/create/create.mcfunction index e11a516b29..a3e42296a0 100644 --- a/modules/bs.sidebar/data/bs.sidebar/function/create/create.mcfunction +++ b/modules/bs.sidebar/data/bs.sidebar/function/create/create.mcfunction @@ -34,16 +34,16 @@ execute unless score #s bs.ctx matches 1 run return run function #bs.log:error { } # check that the contents have between 1 and 15 entries -execute store result score #l bs.ctx if data storage bs:ctx _.contents[] -execute unless score #l bs.ctx matches 1..15 run return run function #bs.log:error { \ +execute store result score #s bs.ctx if data storage bs:ctx _.contents[] +execute unless score #s bs.ctx matches 1..15 run return run function #bs.log:error { \ namespace: "bs.sidebar", \ path: "#bs.sidebar:create", \ tag: "create", \ - message: '[{"text":"The contents must have between 1 and 15 lines (","color":"red"},{"score":{"name":"#l","objective":"bs.ctx"}},{"text":" given)."}]', \ + message: '[{"text":"The contents must have between 1 and 15 lines (","color":"red"},{"score":{"name":"#s","objective":"bs.ctx"}},{"text":" given)."}]', \ } # start the recursion to create each line abort if a line failed execute as B5-0-0-0-2 run function bs.sidebar:create/recurse/start with storage bs:ctx _ data remove entity @s CustomName -execute if score #l bs.ctx = #i bs.ctx run return 1 +execute if score #s bs.ctx = #i bs.ctx run return 1 return run function bs.sidebar:create/recurse/abort with storage bs:ctx _ diff --git a/modules/bs.sidebar/data/bs.sidebar/tags/function/create.json b/modules/bs.sidebar/data/bs.sidebar/tags/function/create.json index c7eea40348..09440b62db 100644 --- a/modules/bs.sidebar/data/bs.sidebar/tags/function/create.json +++ b/modules/bs.sidebar/data/bs.sidebar/tags/function/create.json @@ -5,6 +5,9 @@ "authors": [ "Aksiome" ], + "contributors": [ + "runoshun" + ], "created": { "date": "2023/08/18", "minecraft_version": "23w32a"