Block Swap Advanced 是一款工具类 / 世界生成模组,为玩家提供了一种在 World Gen(世界生成)及之后阶段通过替换方块来修改构成其世界的方块的方法:基于方块属性控制替换、控制发生替换的维度、生物群系或结构、限制替换仅在世界生成或玩家放置时发生、限制替换到特定高度范围、添加一些随机性或渐变效果等等……
方块替换配置
通过修改名为 block_swap.json5 的配置文件,玩家可以利用各种不同选项将任意数量的方块从一种类型替换为另一种类型:你可以确保来自不同模组的多种矿石都变成同一种类型,或者你也可以将下界变成一片冰冻荒原。
该配置文件存储在每个世界的 serverconfig/block_swap.json5 中(例如 world/serverconfig/block_swap.json5)。
玩家可以设置一个全局方块替换模板,它将被复制到所有新生成的世界中。这是通过将配置文件放置在 defaultconfigs 文件夹中完成的(例如 defaultconfigs/block_swap.json5)。
可用的 'swapper' 选项
以下是当前可用于定义方块如何被替换的所有选项:
必需的 'core' 选项:
- old (BlockState, required): 将被替换的方块(例如
{"Name": "minecraft:cobblestone"})。
- new (BlockState, required): 用于替换旧方块的新方块(例如
{"Name": "minecraft:diamond_block"})。
*注意 - Block Swap Advanced 支持方块属性:(例如 {"Name": "minecraft:pointed_dripstone", "Properties": {"thickness": "tip"}})。
可选的 'core' 选项:
-
replace_placement (boolean, default: true): 定义当方块由玩家或实体放置时是否进行替换。如果你只想替换已放置的方块,也可以使用 only_replace_placements。
-
min_y (integer, default: world min height): 替换的最小 Y 轴等级。除非设置的世界最小高度以外的值,否则请勿使用。
-
max_y (integer, default: world max height): 替换的最大 Y 轴等级。除非设置的世界最大高度以外的值,否则请勿使用。
-
block_swap_rand (float, 0.0 to 1.0, default: 1.0): 替换的随机化因子(0.0 = 无替换,1.0 = 全部替换,0.5 = 50% 几率)。
-
min_y_buffer_zone (integer, default: 0): min_y 下方的 Y 轴范围,在此范围内替换概率降低(例如,8 表示从 min_y 延伸到 min_y-8)。
-
max_y_buffer_zone (integer, default: 0): max_y 上方的 Y 轴范围,在此范围内替换概率降低(例如,8 表示从 max_y 延伸到 max_y+8)。
-
ignore_block_properties (boolean, default: false): 是否在匹配旧状态时忽略方块属性(true = 仅匹配方块类型,false = 匹配指定的属性)。
'filter' 选项:
-
dimensions_whitelist (list of strings, default: []): 应用替换的维度 ID(例如 ["minecraft:overworld"])。
-
dimensions_blacklist (list of strings, default: []): 阻止替换发生的维度 ID(例如 ["minecraft:the_nether"])。
-
biomes_whitelist (list of strings, default: []): 应用替换的生物群系 ID(例如 ["minecraft:plains"])。
-
biomes_blacklist (list of strings, default: []): 阻止替换发生的生物群系 ID(例如 ["minecraft:deep_ocean"])。
-
structures_whitelist (list<string>, default: []): 应用替换的结构 ID(例如 ["minecraft:village_plains"])。
-
structures_blacklist (list<string>, default: []): 阻止替换发生的结构 ID(例如 ["minecraft:mineshaft"])。
布尔标志:
- only_replace_placement (boolean, default: false): 定义方块替换是否应仅限于仅在玩家放置方块时发生(跳过生成/retro_gen/redo_gen)。
- defer_swap (boolean, default: false): 定义是否应将替换延迟到特征生成完成后进行,以便依赖的方块能够生成(例如,钟乳石依赖于滴水石块已生成)。
注意事项
-
在模组的配置文件夹 (block_swap_advanced) 中可以找到一个示例 block_swap.json5。这可以用作 defaultconfig 中的模板。
-
除非另有说明,所有字段都是可选的。省略的字段使用默认的内部值。
-
方块状态使用方块 ID 和属性。将 generate_block_info 设置为 true 以生成所有方块信息的列表以供参考。
-
若要在世界生成期间进行替换,请使用 retro_gen 并将模板 block_swap.json5 放入 defaultconfig 中。
-
使用 retro_gen 时,离开并重新加入世界后,定义的方块替换将对所有未处理的区块执行一次。
-
若要在每次加载世界时重新加载替换规则,请使用 redo_gen。
-
使用 min_y_buffer 或 max_y_buffer 时,缓冲区域会创建平滑过渡,使方块替换看起来更自然。
-
对于其他方块在生成过程中依赖的方块,请使用 defer_swap(例如,如果你在不使用 defer_swap 的情况下修改了滴水石块,钟乳石将不会生成。为了避免这种情况,请使用 defer_swap)。
-
当大量方块发生替换时,在世界加载期间可能会出现卡顿。你可以使用 chunk_swap_range 将方块替换限制在玩家周围特定区块范围内,以帮助改善性能。
-
通过模组的 GitHub 报告问题或请求功能 ()。
-
启用 verbose_logging 后检查日志 (latest.log) 以进行调试。请注意,由于会向 latest.log 添加信息,使用 verbose_logging 可能会导致卡顿。
警告
- Block Swap Advanced 可以用来完全改变你的世界,但如果不小心的话,也可能毁掉一切。如果不确定,请在应用任何更改之前备份你的世界。
待办事项
-
更新到 1.21.1 及更多?
-
回溯移植到 1.19.2 及更低版本?
-
新增配置选项:conditional_swap - 仅在满足条件属性时交换方块
(例如,将玄武岩替换为滴水石锥,但仅当上方或下方有空气时)
(例如,将沙子替换为玻璃,但仅当周围任意方向有岩浆时)
(例如,将空气替换为草方块,但仅当下方有草方块时)
-
新增配置选项:x_z_buffer_zone - 在 X 和 Z 轴上对已交换的方块应用缓冲区(进行中)
-
新增配置选项:player_swap_range - 限制方块交换仅在玩家周围的一定球形范围内发生。
-
自定义世界内方块交换和方块交换 GUI(进行中)
-
添加更多交换配置?
致谢
- Block Swap Advanced 是受 Corgi_Taco 的「Block Swap」模组启发的重制与扩展版。感谢 Corgi Taco 和 J.T. McQuigg 在原模组上的工作
- Block Swap Advanced 使用了来自「Jankson」Maven 仓库的 json5 格式
'Block Swap Advanced' is a utility / world gen mod which Provides players with a way to modify the blocks that make up their world by swapping them around during world gen and beyond: Control swaps based on block properties, Control the dimension, biome, or structure where swaps occur, Limit swaps to world generation or player placement, Limit swaps to a specific height range, Add some randomness or gradation, and more...
Block Swapping Configuration
By modifying a config file called block_swap.json5, players are able to swap any number of blocks from one type into another using a variety of different options: you can make sure that all ores from a variety of different mods are the same type, or you could turn the Nether into a frozen wasteland.
The config file is stored in 'serverconfig/block_swap.json5' for each world (e.g., 'world/serverconfig/block_swap.json5')
Players can set up a global block swap template that will be copied to all newly generated worlds. This is done by placing a config in the 'defaultconfigs' folder (e.g. 'defaultconfigs/block_swap.json5')
Available 'swapper' Options
These are all the currently availible options that can be used to define how blocks get swapped:
Required 'core' options:
- old (BlockState, required): The block that will get replaced (e.g., {"Name": "minecraft:cobblestone"}).
- new (BlockState, required): The new block to replace the old block (e.g., {"Name": "minecraft:diamond_block"}).
*Note - Block Swap Advanced supports block properties: (e.g., {"Name": "minecraft:pointed_dripstone", "Properties": {"thickness": "tip"}}).
Optional 'core' options:
-
replace_placement (boolean, default: true): Defines if blocks are swapped when placed by players or entities. You can also use 'only_replace_placements' if you want only placed blocks to be swapped.
-
min_y (integer, default: world min height): Minimum Y level for swaps. Don't use unless setting a value other than the min world height.
-
max_y (integer, default: world max height): Maximum Y level for swaps. Don't use unless setting a value other than the max world height.
-
block_swap_rand (float, 0.0 to 1.0, default: 1.0): Randomization factor for swaps (0.0 = no swaps, 1.0 = all swaps, 0.5 = 50% chance).
-
min_y_buffer_zone (integer, default: 0): Y-range below min_y where swap probability decreases (e.g., 8 extends from min_y to min_y-8).
-
max_y_buffer_zone (integer, default: 0): Y-range above max_y where swap probability decreases (e.g., 8 extends from max_y to max_y+8).
-
ignore_block_properties (boolean, default: false): Whether to ignore block properties when matching the old state (true = match block type only, false = match specified properties).
'filter' options:
-
dimensions_whitelist (list of strings, default: []): Dimension IDs where swaps apply (e.g., ["minecraft:overworld"]).
-
dimensions_blacklist (list of strings, default: []): Dimension IDs where swaps are prevented (e.g., ["minecraft:the_nether"]).
-
biomes_whitelist (list of strings, default: []): Biome IDs where swaps apply (e.g., ["minecraft:plains"]).
-
biomes_blacklist (list of strings, default: []): Biome IDs where swaps are prevented (e.g., ["minecraft:deep_ocean"]).
-
structures_whitelist (list<string>, default: []): Structure IDs where swaps apply (e.g., ["minecraft:village_plains"]).
-
structures_blacklist (list<string>, default: []): Structure IDs where swaps are prevented (e.g., ["minecraft:mineshaft"]).
Boolean flags:
- only_replace_placement (boolean, default: false): Defines if block swaps should be limited to ONLY occur for player block placement (skip generation/retro_gen/redo_gen).
- defer_swap (boolean, default: false): Defines if swapping should be delayed until after feature generation completes, allowing dependent blocks to generate (e.g., pointed_dripstone depends on dripstone_block being generated).
Notes
-
An example 'block_swap.json5' can be found in the mod's config folder (block_swap_advanced). This can be used as a template in 'defaultconfig'
-
All fields are optional unless specified. Omitted fields use default internal values.
-
Block states use block IDs and properties. Set 'generate_block_info' to 'true' to generate a list of all block information for reference).
-
To have swaps occur during world generation, use 'retro_gen' along with putting a template block_swap.json5 in 'defaultconfig'.
-
When using 'retro_gen', upon leaving and rejoining the world, defined block swaps will occur once for all chunks that haven't been processed.
-
To have swaps reload every time the world is loaded, use 'redo_gen'.
-
When using 'min_y_buffer' or 'max_y_buffer', buffer zones create a gradual transition for more natural-looking block swaps.
-
Use 'defer_swap' for blocks that other blocks depend on during generation (for example, if you modify dripstone_block without defer_swap, pointed_dripstone won't generate. To avoid this, use defer_swap).
-
When swapping occurs for a large amount of blocks, there may be lag during world load. You can use 'chunk_swap_range' to limit block swapping to only occur within a certain chunk range of players to help with preformance.
-
Report issues or request features via the mod's github ().
-
Check logs (latest.log) with verbose_logging enabled for debugging. Be careful as using 'verbose_logging' can cause lag due to adding information to latest.log.
Warning
- Block Swap Advanced can be used to completely change your world, but if you aren't careful, it could also ruin everything. Make a backup of your world before applying any changes if you aren't sure.
ToDo List
-
Update to 1.21.1 and more?
-
Backport to 1.19.2 and less?
-
New config option: conditional_swap - swap blocks only when conditional properties are met
(e.g., swap basalt with pointed_dripstone, but only if there is air above or below)
(e.g., swap sand with glass, but only if there is lava in any direction around it)
(e.g., swap air with grass, but only if there is grass_block below)
-
New config option: x_z_buffer_zone - applies buffer around swapped blocks on the x and z axis (in-progress)
-
New config option: player_swap_range - limit block swapping to only occur within a certain spherical range around players.
-
Custom in-world block swapping and block swap gui (in-progress)
-
Add even more swap configurations?
Credit
- Block Swap Advanced is a remake and expansion inspired by Corgi_Taco's 'Block Swap' mod. Credit to Corgi Taco and J.T. McQuigg for their work on the original mod
- Block Swap Advanced uses json5 format from the 'Jankson' Maven Repository ()
评论 0
登录后参与评分
还没有评论,来抢沙发吧