WorldBorder 的附加组件是一个适用于 BACAP 和 BACAPED 的数据包,它将世界边界设置为 1 格,并随着你获得进度逐步扩大。
此附加组件通过限制探索来增加世界的挑战性,直到你在进度树中取得进展。它旨在以可控且富有回报的方式鼓励玩家推进和探索。
功能
独立奖励模式
每个进度都提供基于其难度的独特奖励,从几分之一格到数百甚至数千格不等。
层级奖励模式
奖励与进度的层级(任务、目标、挑战、超级挑战等)相关联,确保世界边界的扩展更加可预测。
灵活的配置
所有配置均通过主菜单完成:/function bacap_wb_addon:config
快速扩展模式
在标准模式下,世界边界扩展所需的时间基于所奖励格数的平方根。快速模式使所有边界扩展立即发生。
半径 Boss 栏
允许你始终查看当前世界大小,并通过填充式的 Boss 栏直观地跟踪正在进行的扩展进度。
奖励设置
- 在上述两种奖励模式之间切换。
- 调整全局扩展乘数,使你的游戏体验更容易或更难。
- 将层级设置重置为默认值。
- 查看当前的奖励设置。
记分板设置
允许显示一个记分板,精确追踪每位玩家通过完成进度为世界扩展贡献了多少格(推荐用于多人游戏)。
安装过程
- 下载适用于你 Minecraft 版本的数据包
- 对于新世界:在创建新世界时点击“数据包”选项并选择此数据包。
- 对于已有世界:将其粘贴到世界文件夹 - (world-name)/datapacks 中。
- 重启世界
常见问题解答
链接
致贡献者
如果你想建议功能、报告错误等,你可以在 Komaru Cats Discord、Create an issue 或 GitHub 上的 Pull request 中进行反馈。
致整合包开发者
该附加组件在设计时考虑了模块化,允许社区整合包无缝集成他们自己的奖励,而不会破坏核心逻辑。
有几个函数标签可以帮助你将自己的功能集成到数据包中(你可以在 bacap_wb_addon/tags/function 中找到它们):
detect_mode: 在进入世界后几秒钟调用。WB Addon 用于检查是否安装了 Enhanced Discoveries。
install: 仅在首次进入世界时调用一次。
init_blocks: 在 post_detect_mode_load 内部的 detect_mode 之后调用,用于初始化独立的格数奖励。执行顺序始终为 BACAP -> BACAPED -> Fanpacks。
init_tiers: 在 post_detect_mode_load 内部的 detect_mode 之后调用,用于初始化层级格数奖励。执行顺序始终为 BACAP -> BACAPED -> Fanpacks。
post_detect_mode: 作为最终加载函数,在 post_detect_mode_load 之后调用。
reset_tiers_flags: 当玩家重置层级奖励设置时调用。
1_second_timer 当数据包已安装时,每秒调用一次。
如何为自定义 BACAP 插件添加方块奖励
- 你的数据包必须在完成进度后支持 fanpack 处理(例如,BACAP 在完成任何进度后会调用 fanpack 函数标签:
$function #bacap_fanpacks:$(reward_id))。
- 在你的数据包的
function 文件夹中,创建一个包含进度奖励信息的文件。其格式必须如下所示:
execute if score <advancement id> wb matches 1 run return 0
data modify storage bacap_wb_addon:temp current_adv set value {adv_id:"<advancement id>",title:"<advancement title>",title_color:"<title color>",desc:"<advancement description>",desc_color:"<description color>",tab:"<advancement tab>",type:"<type (add/set)>",tier:"<tier (task, goal, challenge, super_challenge, milestone, hidden, advancement_legend, root)>"}
function bacap_wb_addon:queue/process_reward with storage bacap_wb_addon:temp current_adv
“A Chiptune Relic”进度的示例文件:
execute if score adventure/a_chiptune_relic wb matches 1 run return 0
data modify storage bacap_wb_addon:temp current_adv set value {adv_id: "adventure/a_chiptune_relic", title: "A Chiptune Relic", title_color: "#75E1FF", desc: "Excavate an ancient record from within the Trail Ruins", desc_color: "#63BDD7", tab: "Adventure", type: "add", tier: "goal"}
function bacap_wb_addon:queue/process_reward with storage bacap_wb_addon:temp current_adv
- 为该进度添加一个指向你刚刚创建的函数的 fanpack 函数标签。对于“A Chiptune Relic”,它看起来像这样:
- 路径:
data/bacap_fanpacks/tags/function/adventure/a_chiptune_relic.json
- 文件内容:
{
"values": [
"<your_namespace>:rewards/adventure/a_chiptune_relic"
]
}
这就是设置层级方块奖励所需的全部内容。
注意:如果你希望某个特定的进度不受层级规则限制,可以执行以下操作
在进度奖励信息中添加 custom_tier_blocks: <your amount of blocks> 标签,并将 tier 更改为 custom
“Ten Thousand Blocks”进度的示例文件(它将使世界增加 70k 个方块):
execute if score biomes/ten_thousand_blocks wb matches 1 run return 0
data modify storage bacap_wb_addon:temp current_adv set value {adv_id: "biomes/ten_thousand_blocks", title: "Ten Thousand Blocks", title_color: "#75E1FF", desc: "Travel at least 10,000 blocks from the centre of the world in any direction.\nA journey that long begins with a single step", desc_color: "#63BDD7", tab: "Biomes", type: "add", tier: "custom", custom_tier_blocks: 7000000}
function bacap_wb_addon:queue/process_reward with storage bacap_wb_addon:temp current_adv
针对单个方块奖励:
注意:每个进度的最大方块数量为 21474836,否则会导致未定义的行为
- 创建一个将包含所有单个方块奖励的函数(例如,
data/<your_namespace>/function/init_individual_blocks.mcfunction)。其内容应为:
scoreboard players set <advancement id without namespace> wb_adv_blocks <amount of blocks multiplied by 100 for 2-digit precision>
例如,这一行为 blazeandcave:adventure/allayance 进度设置了 6.00 个方块的奖励:
scoreboard players set adventure/allayance wb_adv_blocks 600
- 添加一个函数标签,将你的
init_individual_blocks 函数注入到 WB Addon 的初始化过程中。
如何更改现有的单个奖励
过程与添加新奖励完全相同。但是,由于包含进度信息的文件已经存在,你只需要创建自己的函数来覆盖现有奖励,并将其注入到 data/bacap_wb_addon/tags/function/init_blocks.json 函数标签中。
如何覆盖层级奖励或添加新的层级
层级奖励初始化仅在数据包初始化时调用一次。我们使用一个唯一的初始化标志(例如,BACAP 使用 #wb_bacap_tiers_init)。这确保了这些默认值仅应用一次。如果玩家稍后通过 UI 更改它们,或者如果 fanpack 在其首次加载时覆盖了它们,则 /reload 不会将其恢复,因为该标志已设置为 1。
有两种不同的奖励行为(由进度 .mcfunction 文件中的 "type" 字段定义):
add(默认): 此类型的进度会将方块添加到世界边界大小。这些层级值必须乘以 100 以支持小数位(例如,1 个方块 = 100,5.5 个方块 = 550,10 个方块 = 1000)。
set: 此类型的进度会将世界边界设置为确切的方块数量。这些层级值不乘以 100。
注意:每个进度的最大方块数量为 21,474,836。超过此限制将导致未定义的行为。如果你不小心将一个巨大的 set 层级值乘以 100,它将导致整数溢出并破坏数据包的计算!
-
创建一个函数,用于包含你所有的阶梯奖励(例如:data/<your_namespace>/function/init_tier_blocks.mcfunction)。内容应如下所示:
execute unless score <your initialization flag> wb matches 1 run scoreboard players set #task wb_tier_blocks <blocks multiplied by 100>
例如,此行将为 goal 进度设置 4.00 方块的奖励:
execute unless score #myaddon_tiers_init wb matches 1 run scoreboard players set #goal wb_tier_blocks 400
注意:add 类型的阶梯会乘以 100 以支持小数位(例如,1 个方块 = 100,5.5 个方块 = 550,10 个方块 = 1000)。
advancement_legend 阶梯是 set 类型,因此不乘以 100:
execute unless score #myaddon_tiers_init wb matches 1 run scoreboard players set #advancement_legend wb_tier_blocks 59999968
默认的阶梯包括: #task、#goal、#challenge、#super_challenge、#milestone、#hidden 和 #advancement_legend。
最后,在文件末尾标记你的阶梯已初始化:
execute unless score <your initialization flag> wb matches 1 run scoreboard players set <your initialization flag> wb 1
-
添加一个函数标签,将你的 init_tier_blocks 函数注入到 WB Addon 的初始化过程中。
如何通过数据包更改全局乘数
最简单的方法是通过调用 bacap_wb_addon:config/set_multiplier 函数,并将你希望使用的乘数作为宏参数传递。
注意:乘数必须在 0.6 到 10.0 之间,且最多保留两位小数。 超出此范围的数值可能导致数据包无法完成、出现浮点数精度丢失或破坏内部计算。
例如,此命令将全局乘数设置为 2.31:
function bacap_wb_addon:config/set_multiplier {value: 2.31}
由 ItzSkyReed、_Fedor_F、Hogurt 创建
WorldBorder's Addon is a datapack for BACAP and BACAPED that sets the world border to 1 block and gradually expands it as you earn advancements.
This addon adds an extra challenge to your world by limiting exploration until you make progress through the advancement tree. It's designed to encourage progression and exploration in a controlled and rewarding way.
Features
Individual rewards mode
Each advancement offers a unique reward based on its difficulty, ranging from fractions of a block to hundreds and even thousands
Tier rewards mode
Rewards are linked to the advancement's tier (Task, Goal, Challenge, Super Challenge, etc.), ensuring a more predictable world expansion
Flexible configuration
All configuration is done via the main menu: /function bacap_wb_addon:config
Fast Expansion Mode
In standard mode, the time it takes for the border to expand is based on the square root of the awarded blocks. Fast mode makes all border expansions happen instantly.
Radius Bossbar
Allows you to always see the current world size and visually track the ongoing expansion progress via a filling bossbar.
Reward Settings
- Toggle between the reward modes described above.
- Adjust the global expansion multiplier to make your playthrough easier or harder.
- Reset tier settings to their default values.
- View your current reward settings.
Scoreboard Settings
Allows you to display a scoreboard tracking exactly how many blocks each player has contributed to the world expansion by completing advancements (recommended for multiplayer).
Installation process
- Download datapack for your version of minecraft
- For a new world: You can click the "Data Packs" option when creating a new world and select this datapack.
- For an existing world: Paste it into world folder - (world-name)/datapacks.
- Restart world
FAQ
-
Is it possible to complete BACAP(ED) with this Addon?
- Yes! The datapack is mathematically balanced so that, with enough effort, it is entirely possible to complete 100% of the advancements even on the lowest multiplier on most world seeds.
-
How do I complete distance advancements if the border expands so slowly?
- That's by design! You need to earn enough blocks through regular gameplay to reach the first distance milestones (10,000 blocks). Completing these specific distance advancements will grant you a massive block reward, allowing you to reach the next milestone, and so on. Even in "Tier rewards" mode, these advancements ignore their tier and grant the huge reward!
-
What are the standard rewards for advancements in each tier? How many blocks can be obtained by completing all the advancements in a tier?
| Tier |
BACAP (adv. count × blocks = total) |
BACAPED (adv. count × blocks = total) |
| Task |
606 × 1 = 606 |
645 × 1 = 645 |
| Goal |
349 × 4 = 1396 |
453 × 3 = 1359 |
| Challenge |
213 × 25 = 5325 |
332 × 10 = 3320 |
| Super Challenge |
38 × 250 = 9500 |
87 × 100 = 8700 |
| Milestone |
14 × 800 = 11200 |
29 × 500 = 14500 |
| Hiddens |
13 × 0 = 0 |
52 × 0 = 0 |
| Sum |
28027 |
28524 |
Links
For Contributors
If you wanna suggest a feature, report a bug etc. you can make it either in Komaru Cats Discord, Create an issue or Pull request on GitHub.
For Fanpack developers
The addon is built with modularity in mind, allowing community fanpacks to seamlessly integrate their own rewards without breaking the core logic.
There are several function tags that can help you integrate your features into the pack (you can find them in bacap_wb_addon/tags/function):
detect_mode: Called a few seconds after entering the world. Used in WB Addon to check if Enhanced Discoveries is installed.
install: Called only once, upon entering the world for the very first time.
init_blocks: Called after detect_mode inside post_detect_mode_load to initialize individual block rewards. The execution order is always BACAP -> BACAPED -> Fanpacks.
init_tiers: Called after detect_mode inside post_detect_mode_load to initialize tier block rewards. The execution order is always BACAP -> BACAPED -> Fanpacks.
post_detect_mode: Called after post_detect_mode_load as the final load function.
reset_tiers_flags: Called when a player resets the tier reward settings.
1_second_timer Called every second when datapack is installed.
How to add a block reward for your custom BACAP Addon
- Your datapack must support fanpack handling after completing an advancement (e.g., BACAP calls a fanpack function tag after completing any advancement:
$function #bacap_fanpacks:$(reward_id)).
- Inside your datapack's
function folder, create a file containing the advancement reward information. It must look like this:
execute if score <advancement id> wb matches 1 run return 0
data modify storage bacap_wb_addon:temp current_adv set value {adv_id:"<advancement id>",title:"<advancement title>",title_color:"<title color>",desc:"<advancement description>",desc_color:"<description color>",tab:"<advancement tab>",type:"<type (add/set)>",tier:"<tier (task, goal, challenge, super_challenge, milestone, hidden, advancement_legend, root)>"}
function bacap_wb_addon:queue/process_reward with storage bacap_wb_addon:temp current_adv
Example file for the "A Chiptune Relic" advancement:
execute if score adventure/a_chiptune_relic wb matches 1 run return 0
data modify storage bacap_wb_addon:temp current_adv set value {adv_id: "adventure/a_chiptune_relic", title: "A Chiptune Relic", title_color: "#75E1FF", desc: "Excavate an ancient record from within the Trail Ruins", desc_color: "#63BDD7", tab: "Adventure", type: "add", tier: "goal"}
function bacap_wb_addon:queue/process_reward with storage bacap_wb_addon:temp current_adv
- Add a fanpack function tag for the advancement that points to the function you just created. For "A Chiptune Relic", it looks like this:
- Path:
data/bacap_fanpacks/tags/function/adventure/a_chiptune_relic.json
- File content:
{
"values": [
"<your_namespace>:rewards/adventure/a_chiptune_relic"
]
}
That is all you need for tier block rewards.
Note: If you want a specific advancement to be exempt from the tier rules, you can do the following
Add custom_tier_blocks: <your amount of blocks> tag to the advancement reward information and change tier to custom
Example file for the "Ten Thousand Blocks" advancement (it will increase the world for 70k blocks):
execute if score biomes/ten_thousand_blocks wb matches 1 run return 0
data modify storage bacap_wb_addon:temp current_adv set value {adv_id: "biomes/ten_thousand_blocks", title: "Ten Thousand Blocks", title_color: "#75E1FF", desc: "Travel at least 10,000 blocks from the centre of the world in any direction.\nA journey that long begins with a single step", desc_color: "#63BDD7", tab: "Biomes", type: "add", tier: "custom", custom_tier_blocks: 7000000}
function bacap_wb_addon:queue/process_reward with storage bacap_wb_addon:temp current_adv
For individual block rewards:
Note: Max. amount of blocks per 1 advancement is 21474836, otherwise it will lead to undefined behavior
- Create a function that will contain all of your individual block rewards (e.g.,
data/<your_namespace>/function/init_individual_blocks.mcfunction). The content should be:
scoreboard players set <advancement id without namespace> wb_adv_blocks <amount of blocks multiplied by 100 for 2-digit precision>
For example, this line sets a 6.00 block reward for the blazeandcave:adventure/allayance advancement:
scoreboard players set adventure/allayance wb_adv_blocks 600
- Add a function tag to inject your
init_individual_blocks function into the WB Addon's initialization process.
How to change existing individual rewards
The process is exactly the same as adding new ones. However, since the file containing the advancement information already exists, you only need to create your own function to override the existing rewards and inject it into the data/bacap_wb_addon/tags/function/init_blocks.json function tag.
How to override tier rewards or add new tiers
Tier rewards initialization is called only once per datapack initialization. We use a unique initialization flag (e.g., #wb_bacap_tiers_init for BACAP). This guarantees these defaults are applied exactly ONCE. If a player changes them via the UI later, or if a fanpack overrides them on its first load, a /reload won't revert them back because the flag is already set to 1.
There are two different types of reward behaviors (defined by the "type" field inside the advancement's .mcfunction file):
add (default): Advancements of this type will add blocks to the world border size. These tier values MUST be multiplied by 100 to support decimal places (e.g., 1 block = 100, 5.5 blocks = 550, 10 blocks = 1000).
set: Advancements of this type will set the world border to an exact amount of blocks. These tier values are NOT multiplied by 100.
Note: The maximum amount of blocks per advancement is 21,474,836. Exceeding this limit will lead to undefined behavior. If you accidentally multiply a massive set tier value by 100, it will cause an integer overflow and break the datapack's calculations!
-
Create a function that will contain all of your tier rewards (e.g., data/<your_namespace>/function/init_tier_blocks.mcfunction). The content should look like this:
execute unless score <your initialization flag> wb matches 1 run scoreboard players set #task wb_tier_blocks <blocks multiplied by 100>
For example, this line sets a 4.00 block reward for goal advancements:
execute unless score #myaddon_tiers_init wb matches 1 run scoreboard players set #goal wb_tier_blocks 400
Note: add tiers are multiplied by 100 to support decimal places (e.g., 1 block = 100, 5.5 blocks = 550, 10 blocks = 1000).
The advancement_legend tier is a set tier, so it is not multiplied by 100:
execute unless score #myaddon_tiers_init wb matches 1 run scoreboard players set #advancement_legend wb_tier_blocks 59999968
The default tiers are: #task, #goal, #challenge, #super_challenge, #milestone, #hidden, and #advancement_legend.
Finally, at the end of the file, mark your tiers as initialized:
execute unless score <your initialization flag> wb matches 1 run scoreboard players set <your initialization flag> wb 1
-
Add a function tag to inject your init_tier_blocks function into the WB Addon's initialization process.
How to change the global multiplier via a datapack
The easiest way to do this is by calling the bacap_wb_addon:config/set_multiplier function and passing your desired multiplier as a macro argument.
Note: The multiplier must be between 0.6 and 10.0 with a maximum precision of 2 decimal places. Values outside this range may make the datapack impossible to complete, cause floating-point precision loss, or break internal calculations.
For example, this command sets the global multiplier to 2.31:
function bacap_wb_addon:config/set_multiplier {value: 2.31}
Created by ItzSkyReed, _Fedor_F, Hogurt
评论 0
登录后参与评分
还没有评论,来抢沙发吧