Creeper Healing
这款支持服务器端和客户端的自定义模组允许世界自动修复苦力怕造成的爆炸。它支持配置自定义方块替换列表,告诉模组使用哪些方块来替换之前被破坏的方块,从而实现平衡并防止对该模组的潜在滥用。
如果您正在寻找提供高性价比的 Minecraft 服务器托管服务,请查看 Ember Host。您可以通过下方的横幅支持我的开发工作,这将使我获得每笔首购订单 50% 的收益,同时您也能享受 10% 的折扣。
功能
爆炸修复模式
特殊的模式进一步自定义了爆炸的修复方式:
- 日间修复模式:使爆炸等待直到日出后才开始修复。当修复开始时,它们需要光源才能进行修复。
- 基于难度的修复模式:根据世界或服务器的难度加速或减慢爆炸的修复速度。
- 基于防爆值的修复模式:具有更高防爆值的方块将花费更长时间进行修复。它们的延迟也会受到随机偏移的影响,导致方块以脉冲式的方式修复。
在爆炸修复过程中,方块将被修复。如果玩家可以在该位置放置方块,则该位置的方块可以被修复。
不同的爆炸来源
此模组还支持修复不同类型的爆炸来源,例如生物、TNT 以及床和末影水晶方块等方块。
您还可以为不应被修复的生物爆炸来源设置黑名单。
使爆炸不掉落物品
您可以单独配置来自不同来源的爆炸是否应掉落其物品。默认情况下,除生物爆炸外的所有爆炸源类型都不允许掉落物品,但您可以通过配置文件或命令单独配置这些设置。
还有一个针对生物爆炸来源的黑名单,用于指定在爆炸时不应掉落物品的情况。
可配置的延迟
配置爆炸开始修复所需的时间,以及每次放置方块之间的时间间隔。
请注意,某些爆炸模式会使用自己的值来设定爆炸修复和方块放置的延迟。
- 警告:两种延迟的最小值为 0.05 秒。尝试通过在配置文件中手动设置更低值来强制降低延迟,将导致模组改用默认值。
恢复实体方块的 NBT 数据
切换在修复方块时是否恢复方块的 NBT 数据。您还可以选择强制此方块始终修复,以确保原始方块及其 NBT 数据总是得到修复。
使下落方块不再下落
您可以使沙子、沙砾等方块在修复后保持在原位。这些方块仅在接收邻居更新时才会下落。
白名单
您可以配置一个可选的白名单,允许您指定允许在爆炸中修复的方块。为此,您可以打开模组的配置文件,并找到以下部分:
#使用可选白名单来自定义允许修复的方块。要添加条目,请指定方块的命名空间
#与其标识符,用冒号分隔,并将其添加到下面的方括号之间。每个条目之间用逗号分隔。
#示例条目:
#whitelist_entries = ["minecraft:grass", "minecraft:stone", "minecraft:sand"]
[whitelist]
whitelist_entries = ["minecraft:placeholder"]
要向白名单添加条目,可以向数组中添加一个包含用冒号分隔的方块命名空间和标识符的字符串,如上例所示。每个条目之间用逗号分隔。
您还可以找到一个名为 "enable_whitelist" 的首选项设置,用于启用或禁用白名单的使用。
替换映射
在模组的配置文件中,您可以自定义“替换映射”。如果您希望某个方块被另一个方块修复,而不是使用相同的方块,可以使用此功能。如果一个方块被另一个方块修复,原始方块的属性将被转移到新方块上,保留如方块方向等属性。
要向替换映射添加条目,您可以打开配置文件(位于您的配置文件夹中,名为 creeper-healing.toml),向下滚动并在 [replace_map] 部分下方添加条目,使用以下格式,并通过换行分隔每个条目:
"minecraft:旧方块名称" = "minecraft:新方块名称"
默认情况下,模组在替换映射中包含以下条目:
"minecraft:diamond_block" = "minecraft:stone"
- 警告:不要将同一个方块设置为被多个方块替换,这会导致游戏启动时崩溃。也就是说,不要在替换映射中重复使用相同的键。
额外设置
您还可以找到用于切换额外功能的设置,例如:
- 启用或禁用方块修复时的放置音效。
- 通过治疗药水或再生药水的溅射效果加快爆炸修复速度。
命令
所有模组的设置也可以通过游戏中的命令进行修改。通过父级命令 /creeper-healing 访问所有这些命令。配置文件也支持通过 /creeper-healing reload_config 在游戏中重载,以避免必须重启服务器或世界。请注意,所有命令都需要管理员权限。
配置文件
当服务器或游戏启动时,模组会在游戏的配置文件夹中查找现有的 creeper-healing.toml 文件。如果存在,它将从那里读取值。如果不存在,它将在 /config/creeper-healing.toml 创建一个新的配置文件。然后您可以编辑此文件来配置模组,并重启服务器或游戏以应用更改,或者使用游戏中的 /creeper-healing reload_config 命令。
以下是模组首次初始化或在服务器/世界关闭时未能找到配置文件时生成的默认配置文件。
# 配置与爆炸愈合相关的延迟设置。
[delays]
#(默认值 = 3.0) 爆炸开始愈合前需要等待的时间(秒)。
explosion_heal_delay = 3.0
#(默认值 = 1.0) 方块进行愈合所需的时间(秒)。
block_placement_delay = 1.0
# 切换某些爆炸是否会掉落物品。不包括存储在容器方块内的物品。
[explosion_item_drops]
#(默认值 = false) 是否让由僵尸等生物引起的爆炸掉落物品。
drop_items_on_mob_explosions = false
#(默认值 = true) 是否让由床或末影水晶方块等方块引起的爆炸掉落物品。
drop_items_on_block_explosions = true
#(默认值 = true) 是否让由TNT方块和TNT矿车引起的爆炸掉落物品。
drop_items_on_tnt_explosions = true
#(默认值 = true) 是否让由风爆等触发性爆炸掉落物品。
drop_items_on_triggered_explosions = true
#(默认值 = true) 是否让来源不在本设置类别中的其他爆炸掉落物品。
drop_items_on_other_explosions = true
#若要禁用由特定生物引起的爆炸掉落物品(前提是已启用 drop_items_on_mob_explosions),请在此黑名单中添加这些生物的标识符。
drop_items_on_mob_explosions_blacklist = ["minecraft:placeholder"]
# 配置哪些爆炸允许被修复。
[explosion_sources]
#(默认值 = true) 修复由僵尸等生物引起的爆炸。
heal_mob_explosions = true
#(默认值 = false) 修复由床或末影水晶方块等方块引起的爆炸。
heal_block_explosions = false
#(默认值 = false) 修复由TNT方块和TNT矿车引起的爆炸。
heal_tnt_explosions = false
#(默认值 = false) 修复由风爆等触发性爆炸。
heal_triggered_explosions = false
#(默认值 = false) 修复来源不在本设置类别中的其他爆炸。
heal_other_explosions = false
#若要禁用由特定生物引起的爆炸被修复(前提是已启用 heal_mob_explosions),请在此黑名单中添加这些生物的标识符。
heal_mob_explosions_blacklist = ["minecraft:placeholder"]
# 选择用于爆炸修复的不同特殊模式。注意,某些修复模式将不遵循爆炸延迟和方块延迟的设置。
[explosion_healing_mode]
#(默认值 = "default_mode") 通过复制以下字符串之一并将其粘贴到下方“mode”设置的值中,选择任意一种修复模式:
#"default_mode", "daytime_healing_mode", "difficulty_based_healing_mode", "blast_resistance_based_healing_mode"
mode = "DEFAULT_MODE"
# 额外功能的可切换设置。
[preferences]
#(默认值 = false) 是否在修复时恢复方块的 NBT 数据。此选项可防止箱子等容器方块掉落其库存。当因 replace map 条目导致修复后的方块与被破坏的方块不同时,此选项不适用。
restore_block_nbt = false
#(默认值 = false) 是否强制具有 NBT 数据的方块始终进行修复,即使 replace map 指定了该方块的替代方块,也不管当前占据该位置的方块是什么。
force_blocks_with_nbt_to_always_heal = false
#(默认值 = true) 允许在修复后使沙或砾石等下落方块继续下落。禁用此选项会使下落方块在下落前必须接收邻居更新。
make_falling_blocks_fall = true
#(默认值 = true) 是否在方块被修复时播放放置音效。
block_placement_sound_effect = true
#(默认值 = true) 方块放置音效是否会产生一些粒子效果。
block_placement_particles = true
#(默认值 = true) 当向爆炸投掷治疗药水时,立即修复爆炸。
heal_on_healing_potion_splash = true
#(默认值 = true) 当向爆炸投掷再生药水时,开始其修复过程。
heal_on_regeneration_potion_splash = true
#(默认值 = false) 切换白名单的使用。
enable_whitelist = false
# 使用可选白名单来自定义允许修复的方块。要添加条目,请指定方块的命名空间
#及其标识符,用冒号分隔并用双引号括起来,然后将其添加到下方的方括号之间。每个条目之间用逗号分隔。
#示例条目:
#whitelist_entries = ["minecraft:grass", "minecraft:stone", "minecraft:sand"]
[whitelist]
whitelist = ["minecraft:placeholder"]
# 添加您自己的替换条目以配置哪些方块应用于修复其他方块。右侧的方块将用于修复左侧的方块。
#指定方块的命名空间以及方块的名称标识符,用冒号分隔并用双引号括起来。
#示例条目:
#"minecraft:gold_block" = "minecraft:stone"
#警告,replace map 中同一个键不能出现多次!例如,以下内容会导致错误:
#"minecraft:diamond_block" = "minecraft:stone"
#"minecraft:diamond_block" = "minecraft:air"
[replace_map]
"minecraft:diamond_block" = "minecraft:stone"
支持
如果您想报告错误或提出建议,可以通过模组的 问题追踪器 进行反馈。
致谢
- 感谢 Kioku 为本模组设计图标。
- 感谢 @sulpherstaer 提供制作本模组灵感和想法。
- 感谢 Fabric Discord 服务器上的 @_jacg 帮助我设置自定义配置文件。
- 感谢 @dale8699 帮助改进模组并提供创意。
Creeper Healing
This server and client side, customizable mod allows the world to automatically heal Creeper explosions. It has support for configuring a custom block-replace list, for telling the mod what blocks to use to replace a previously broken one, allowing for balancing and preventing potential abuse of this mod.
Check out Ember Host if you are looking for a Minecraft server host that offers exceptional value for price. You can support my development by using the banner below, which gives a 50% cut for every first purchase to me, alongside a 10% discount to you.
Features
Explosion healing modes
Special modes that customize the way explosions are healed even further:
- Daytime Healing Mode: Makes explosions wait until sunrise to begin healing. When they do, they will need a source of light to be able to heal.
- Difficulty-based Healing Mode: Speeds up or slows down the healing of explosions depending on the difficulty of the world or server.
- Blast-resistance based Healing Mode: Blocks with a higher blast resistance will take longer to heal. Their delays will also receive a randomized offset, causing blocks to heal in bursts.
Blocks will be healed during the explosion healing process. A block may be healed at a position if a player would also be able to place a block at that position.
Different explosion sources
This mod also supports the healing of different types of explosion sources, such as mobs, TNT and blocks such as beds and end crystal blocks.
You can also configure a blacklist for mob explosion sources that should not be healed.
Make explosions not drop items
You can individually configure whether explosions coming from different sources should drop their items. By default, all explosion source types except mob explosions are not allowed to drop their items, but you can configure these settings individually via the config file or via commands.
There is also a blacklist for mob explosion sources that should not drop items when exploding.
Configurable delays
Configure the amount of time it takes for an explosion to start healing, and the amount of time between each block placement.
Keep in mind that some explosion modes will use their own values for the explosion heal and block placement delays.
- Warning: Both delays have a minimum value of 0.05 seconds. Attempting to force a lower value by setting it manually in the config will make the mod use the default values instead.
Restore the NBT data of block entities
Toggle the restoration of block NBT data when healing the block. You can also optionally force this block to always heal to guarantee the original block along with its nbt data is always healed
Make falling blocks not fall
You can make blocks such as sand and gravel remain in place when healed. These will only fall when receiving a neighbor update.
Whitelist
You can configure an optional whitelist that allows you to specify the blocks that are allowed to heal in an explosion. To do this, you can open the mod's configuration file, and find the following section:
#Use an optional whitelist to customize which blocks are allowed to heal. To add an entry, specify the block's namespace
#along with its identifier, separated by a colon, and add it in-between the square brackets below. Separate each entry with a comma.
#Example entries:
#whitelist_entries = ["minecraft:grass", "minecraft:stone", "minecraft:sand"]
[whitelist]
whitelist_entries = ["minecraft:placeholder"]
To add entries to the whitelist, you can add a string containing the block's namespace and identifier separated by a colon to the array, like shown in the example above. Separate each entry with a comma.
You can also find a preference setting named "enable_whitelist" to enable or disable the usage of the whitelist.
Replace map
In the mod's config file, you can customize a "replace map". This is used if you would like a certain block to be healed with another one, instead of using the same block. If a block is healed with another one, the properties of the original block will be carried over to the new block, preserving properties like the block's orientation.
To add entries to the replace map, you can open the configuration file (located in your config folder and named creeper-healing.toml), scroll down and add entries below the [replace_map] section, using the following format, and separating each entry by skipping a line:
"minecraft:name_of_old_block" = "minecraft:name_of_new_block"
By default, the mod includes the following entry in the replace map:
"minecraft:diamond_block" = "minecraft:stone"
- Warning: Do not set the same block to be replaced with multiple blocks, as this will cause a crash upon game startup. That is, do not use the same key twice or more in the replace map.
Extra settings
You can also find settings to toggle extra features, such as:
- Enable or disable the block placement sound effect when a block is healed.
- Heal explosions faster via splash potions of Healing or Regeneration.
Commands
All of the mod's settings can also be modified in-game via commands. Access all of them via the /creeper-healing parent command. The config file also supports being reloaded in-game via /creeper-healing reload_config to avoid having to restart the server or world. Note that all commands require operator permission.
Configuration File
When the server or game is started, the mod will look for an existing creeper-healing.toml file for the config folder of your game. If it exists, it will read the values from there. If not, it will create a new config file in /config/creeper-healing.toml. You can then edit this file to configure the mod, and restart the server or game to apply the changes, or use the /creeper-healing reload_config in-game command.
The following is the default configuration file generated upon first mod initialization or whenever the mod fails to find the config file during server or world shutdown.
#Configure the delays related to the healing of explosions.
[delays]
#(Default = 3.0) How much time in seconds should an explosion wait for to begin healing.
explosion_heal_delay = 3.0
#(Default = 1.0) The time in seconds that a block takes to heal.
block_placement_delay = 1.0
#Toggle whether certain explosion should drop items. Does not include items stored in container blocks.
[explosion_item_drops]
#(Default = false) Whether to drop items on explosions caused by mobs such as Creepers.
drop_items_on_mob_explosions = false
#(Default = true) Whether to drop items on explosions caused by blocks such as beds or end crystal blocks.
drop_items_on_block_explosions = true
#(Default = true) Whether to drop items on explosions caused by TNT blocks and TNT minecarts.
drop_items_on_tnt_explosions = true
#(Default = true) Whether to drop items on explosions such as those caused by wind bursts.
drop_items_on_triggered_explosions = true
#(Default = true) Whether to drop items on explosions whose source is not any of the ones provided in this setting category.
drop_items_on_other_explosions = true
#Add mob identifiers to this blacklist to prevent explosions caused by the added mobs from dropping items if drop_items_on_mob_explosions is enabled.
drop_items_on_mob_explosions_blacklist = ["minecraft:placeholder"]
#Configure which explosions are allowed to heal.
[explosion_sources]
#(Default = true) Heal explosions caused by mobs such as Creepers.
heal_mob_explosions = true
#(Default = false) Heal explosions caused by blocks such as beds or end crystal blocks.
heal_block_explosions = false
#(Default = false) Heal explosions caused by TNT blocks and TNT minecarts.
heal_tnt_explosions = false
#(Default = false) Heal explosions such as those caused by wind bursts.
heal_triggered_explosions = false
#(Default = false) Heal explosions caused by sources which aren't any of the ones provided in this setting category.
heal_other_explosions = false
#Add mob identifiers to this blacklist to prevent explosions caused by the added mobs from healing if heal_mob_explosions is enabled.
heal_mob_explosions_blacklist = ["minecraft:placeholder"]
#Choose between different special modes for explosion healing. Note that certain healing modes will not follow the explosion delay and block delay settings.
[explosion_healing_mode]
#(Default = "default_mode") Choose any of the following healing modes by copying one of the strings and pasting it into the value of the "mode" setting below:
#"default_mode", "daytime_healing_mode", "difficulty_based_healing_mode", "blast_resistance_based_healing_mode"
mode = "DEFAULT_MODE"
#Toggleable settings for extra features.
[preferences]
#(Default = false) Whether to restore block nbt data upon healing. This option prevents container blocks like chests from dropping their inventories. Does not apply when the healed block is different from the destroyed block due to a replace map entry.
restore_block_nbt = false
#(Default = false) Whether to force blocks with nbt data to always heal, even if the replace map specifies a replacement for that block, and regardless of the block that may be occupying that position at the moment of healing.
force_blocks_with_nbt_to_always_heal = false
#(Default = true) Allows for a falling block, like sand or gravel, to fall when healed. Disabling this option makes the falling block have to receive a neighbor update before falling.
make_falling_blocks_fall = true
#(Default = true) Whether a block placement sound effect should be played when a block is healed.
block_placement_sound_effect = true
#(Default = true) Whether a block placement sound effect should produce some cloud particles.
block_placement_particles = true
#(Default = true) Makes explosion heal immediately when a potion of Healing is thrown on them.
heal_on_healing_potion_splash = true
#(Default = true) Makes explosions begin their healing process when a potion of Regeneration is thrown on them.
heal_on_regeneration_potion_splash = true
#(Default = false) Toggle the usage of the whitelist.
enable_whitelist = false
#Use an optional whitelist to customize which blocks are allowed to heal. To add an entry, specify the block's namespace
#along with its identifier, separated by a colon and enclosed in double quotes, and add it in-between the square brackets below. Separate each entry with a comma.
#Example entries:
#whitelist_entries = ["minecraft:grass", "minecraft:stone", "minecraft:sand"]
[whitelist]
whitelist = ["minecraft:placeholder"]
#Add your own replace entries to configure which blocks should be used to heal other blocks. The block on the right will be used to heal the block on the left.
#Specify the block's namespace along with the block's name identifier, separated by a colon and enclosed in double quotes.
#Example entry:
#"minecraft:gold_block" = "minecraft:stone"
#Warning, the same key cannot appear more than once in the replace map! For example, the following will cause an error:
#"minecraft:diamond_block" = "minecraft:stone"
#"minecraft:diamond_block" = "minecraft:air"
[replace_map]
"minecraft:diamond_block" = "minecraft:stone"
Support
If you would like to report a bug, or make a suggestion, you can do so via the mod's issue tracker.
Credits
- Thanks to Kioku for the mod's icon.
- Thanks to @sulpherstaer for giving me the idea and inspiration for making this mod.
- Thansk to @_jacg on the Fabric Discord server helping me out with setting up the custom config file.
- Thanks to @dale8699 for helping me improve and give me ideas for the mod.
评论 0
登录后参与评分
还没有评论,来抢沙发吧