Immortal Snail
这个模组将经典的“永生蜗牛”思想实验带入了 Minecraft 服务器。玩家加入服务器后,将获得近乎无限的财富以及对普通伤害的无敌状态,但一只无法被杀死的蜗牛会在远处生成,并以大约每分钟 1 格的速度缓慢追踪最近的玩家目标。如果它接触到玩家,该玩家的账号将被永久封禁。
本模组需要 Fabric Minecraft 1.21.11 和 Minecraft 26.2。为了渲染自定义的交易界面,此模组必须同时安装在服务器端和每个客户端上。
交易
当玩家首次加入世界时,会触发两个动作:
- 你获得起始装备:一个潜影盒,内含 12 件满附魔的装备物品(全套下界合金盔甲、剑、镐、斧、铲、附魔了力量 V/无限/火焰/击退 II 的弓、弩、三叉戟、战锤以及鞘翅),一个不死图腾,4 个附魔金苹果,16 颗末影珍珠,64 根胡萝卜,以及 10 组建筑材料(石头、原木、火把、金/钻石/绿宝石/铁块、黑曜石、食物和红石)。此外还提供另一个装有 128 支烟花火箭的潜影盒用于飞行。溢出的物品会掉落在地上。
- 加入世界 10 刻后,会出现交易菜单。它展示了两个空的 27 槽位潜影盒,旁边是一个可滚动的物品选择器,显示游戏中所有已注册的物品。在选择器中左键点击物品可将最大堆叠放入下一个可用槽位;右键点击物品可将该物品分配给当前选中的槽位(以黄色高亮标记);右键点击槽位可清空它。选择清除可清空两个盒子,或选择确认以锁定你的选择。当安装了 JEI 时,你可以直接从侧边栏拖拽物品到槽位,查看标准工具提示,并让 JEI 自动调整其侧边栏围绕界面布局。
确认后,这两个装满物品的潜影盒会变成实体物品交给你,并将选择结果永久写入世界存档。该菜单无法拒绝;离线只是推迟它,重新上线会再次提供起始套件并重新打开提示,直到完成为止。
有一小部分技术类物品在交易期间无法选择:所有命令方块变体(包括矿车变体)、结构方块、结构虚空、拼图方块、屏障方块、光方块和刷怪笼。此限制是硬编码的,以防止服务器损坏。
永生规则
在模组世界中,玩家获得功能性无敌:除蜗牛以外的所有来源的伤害均被抵消,包括怪物、熔岩、坠落、虚空伤害、窒息和饥饿(食物和饱和度等级保持在最大值)。这适用于所有玩家,包括单人游戏的房主。
唯一的致命威胁是蜗牛的接触。蜗牛接触时造成 1,000,000 点伤害,无视常规保护。不死图腾默认可以抵御这种攻击。如果服务器管理员设置 totemsWorkAgainstSnail = false,则一旦蜗牛击中,你库存中的所有不死图腾都会被自动清除,从而防止生存。
蜗牛
当第一名玩家加入时,会生成一只蜗牛,它在主世界的世界原点 5,000 到 50,000 格之间随机生成。它会持续寻路前往最近的非旁观模式玩家。
- 速度: 默认移动速度为每分钟 1 格。这个初始距离提供了充足的缓冲时间。运行
/snail locate 可查看其预计到达时间。
- 地形: 像蜘蛛一样攀爬墙壁和天花板,速度是地面速度的 3 倍,并在边缘处保持附着,直到目标从其下方掉落。它会受标准重力影响下落,然后恢复攀爬。
- 障碍: 如果被困住 60 秒未移动,它会开始以每分钟 1 格的速度啃食障碍物方块,产生可见的破坏粒子。默认情况下,基岩、黑曜石和末地传送门框架无法被破坏。挖掘速度、白名单和黑名单可以在配置文件中修改。
- 持久性: 无敌,免疫击退,且永不消失。它的区块会被强制加载,因此即使附近没有玩家,它也会继续前进。如果实体被意外移除,模组会在其最后保存的位置将其恢复。蜗牛数据保存在
<world>/immortalsnail/spawned.dat 中,并在服务器重启间持久化。
- 封禁机制: 接触会导致 1,000,000 点伤害。死亡的玩家会被添加到原版封禁列表中,来源标记为“The Snail”,并附带自定义消息(
banMessage,默认为"The snail caught you."),并被踢出服务器。
蜗牛会 constantly 显示名称标签“The Snail”,并在移动或挖掘时发出方块破坏粒子,使玩家能在近距离发现它。
管理员命令
需要操作员权限(等级 2+)。非操作员可以通过 commandAllowedPlayers 配置选项获得访问权限(接受名称或 UUID,不区分大小写)。
| 命令 |
效果 |
/snail status |
显示位置、原点距离、设定速度、目标玩家和方块破坏状态。 |
/snail locate |
显示位置、当前目标玩家、距离和预计到达分钟数。 |
/snail remove |
从世界中移除蜗牛实体,直到重生。 |
/snail respawn here |
在你所在位置直接重生蜗牛。 |
/snail respawn nearby |
在你的朝向前方 5 格处重生蜗牛。 |
/snail respawn random |
在配置的距离范围内生成新的重生位置。 |
/snail respawn <x y z> |
在特定坐标重生蜗牛(支持 ~ 相对定位)。 |
/snail reload |
在不重启服务器的情况下重新加载 config/immortalsnail-common.toml。 |
配置
配置文件位于 config/immortalsnail-common.toml(首次启动时生成,可通过 /snail reload 重新加载):
| 部分 / 键 |
默认值 |
描述 |
snail: minDistance / maxDistance |
5000 / 50000 |
从世界原点生成的距离范围。 |
snail: speedBlocksPerMinute |
1.0 |
基础地面移动速度。 |
snail: canClimbWalls / climbSpeedMultiplier |
true / 3.0 |
墙壁/天花板攀爬的开关,以及相对于地面速度的速度倍数。 |
snail: canBreakBlocks |
true |
切换蜗牛在被阻挡时是否会咀嚼穿过地形。 |
snail: breakSpeedBlocksPerSecond |
0.0167 |
方块破坏速率(默认为每分钟一个方块)。 |
snail: breakBlocksWhitelist / breakBlocksBlacklist |
[] / [bedrock, obsidian, end_portal_frame] |
允许和禁止的地形破坏列表。如果设置了白名单,则仅能破坏列出的方块;黑名单会覆盖白名单设置。 |
snail: stuckBreakAfterTicks |
1200 |
开始破坏方块前的空闲持续时间(以刻为单位)。 |
snail: chunkForceRadius |
1 |
围绕蜗牛保持加载的区块半径。 |
starter: giveStarterShulker, includeFoodInStarter, includeBasicMaterials |
true |
新手包各个组件的切换开关。 |
starter: bargainShulkerCount / bargainShulkerSize |
2 / 27 |
自定义奖励潜影盒的数量及其物品栏槽位大小。 |
death: banOnSnailKill |
true |
决定被蜗牛杀死是否会导致服务器封禁。 |
death: banMessage |
"The snail caught you." |
向被封禁玩家显示的踢出/封禁屏幕消息。 |
death: totemsWorkAgainstSnail |
true |
控制不死图腾是否能保护玩家免受蜗牛伤害。 |
commandAllowedPlayers |
[] |
允许运行 /snail 命令的非管理员玩家列表。 |
兼容性与要求
本模组添加了一个实体、一个自定义界面和三个网络数据包,除了初始交易提示外,不会修改世界生成或基础游戏逻辑。
- 依赖项: Fabric Loader (≥ 0.19.0 on 26.2)、Fabric API 和 Cloth Config。
- JEI 集成: 可选。物品选择窗口无需 JEI 即可工作,但安装 JEI 后允许直接将物品拖放到交易槽中。
- 安装: 需要在服务器和所有连接客户端上安装,以渲染自定义菜单。
Immortal Snail
This mod brings the classic immortality snail thought experiment to Minecraft servers. Upon joining, players receive near-infinite wealth and invulnerability to normal damage, but an unkillable snail spawns far away and slowly tracks down the nearest target at roughly 1 block per minute. If it reaches you, your account is permanently banned from the server.
Requires Fabric for Minecraft 1.21.11 and Minecraft 26.2. This mod must be installed on both the server and each client to render the custom bargain interface.
The bargain
The first time a player joins the world, two actions trigger:
- You receive starter gear: a shulker box holding 12 max-enchanted gear items (full netherite armor set, sword, pickaxe, axe, shovel, bow with Power V/Infinity/Flame/Punch II, crossbow, trident, mace, and elytra), a Totem of Undying, 4 enchanted golden apples, 16 ender pearls, 64 golden carrots, and 10 stacks of building materials (stone, logs, torches, gold/diamond/emerald/iron blocks, obsidian, food, and redstone). An additional shulker box containing 128 firework rockets is provided for flight. Overflow items drop to the ground.
- Ten ticks after joining, The Bargain menu appears. It presents two empty 27-slot shulker boxes alongside a scrollable item picker displaying every registered item in the game. Left-click an item in the picker to put a max stack into the next available slot; right-click an item to assign it to the currently selected slot (marked with a yellow highlight); right-click a slot to clear it. Select Clear to empty both boxes, or Confirm to lock in your choices. When JEI is installed, you can drag items directly from the sidebar into slots, view standard tooltips, and let JEI automatically arrange its sidebar around the interface.
Confirming hands over the two filled shulker boxes as physical items and permanently writes the selection to the world save. The menu cannot be declined; logging off merely postpones it, and logging back in re-delivers the starter kit and reopens the prompt until completed.
A small set of technical items cannot be picked during the bargain: all command block variants (including the minecart variant), structure blocks, structure voids, jigsaw blocks, barriers, light blocks, and spawners. This restriction is hardcoded to prevent server corruption.
Immortality rules
Players in a modded world gain functional invulnerability: all damage from any source other than the snail is negated, including mobs, lava, falling, void damage, suffocation, and starvation (food and saturation levels remain locked at maximum). This applies to all players, including singleplayer hosts.
The only lethal threat is the snail's touch. The snail deals 1,000,000 damage upon contact, bypassing standard protection. Totems of Undying function against this attack by default. If the server administrator sets totemsWorkAgainstSnail = false, any Totems in your inventory are automatically cleared the moment the snail strikes, preventing survival.
The snail
A single snail spawns when the first player joins, generating between 5,000 and 50,000 blocks away from the world origin in the Overworld. It continuously pathfinds toward the nearest non-spectator player.
- Speed: Moves at 1 block per minute by default. This starting distance provides a significant grace period. Run
/snail locate to check its current ETA.
- Terrain: Climbs walls and ceilings like a spider at 3× ground speed, remaining attached over ledges until the target drops below it. It falls with standard gravity and resumes climbing.
- Obstacles: If stuck without moving for 60 seconds, it begins eating through obstruction blocks at a rate of 1 block per minute, creating visible break particles. By default, bedrock, obsidian, and end portal frames cannot be destroyed. Mining speed, whitelists, and blacklists can be modified in the configuration.
- Persistence: Invulnerable, immune to knockback, and never despawns. Its chunk stays force-loaded so it advances even when no players are nearby. If the entity is accidentally removed, the mod restores it at its last saved position. Snail data persists across server restarts in
<world>/immortalsnail/spawned.dat.
- Ban mechanics: Contact triggers 1,000,000 damage. The killed player is added to the vanilla ban list under source "The Snail" with a custom message (
banMessage, defaults to "The snail caught you.") and kicked from the server.
The snail constantly displays the nameplate "The Snail" and emits block-break particles while moving or digging, allowing players to spot it when close.
Admin commands
Requires operator status (level 2+). Non-ops can be given access via the commandAllowedPlayers configuration option (accepts names or UUIDs, case-insensitive).
| Command |
Effect |
/snail status |
Displays position, origin distance, set speed, target player, and block-breaking status. |
/snail locate |
Displays position, current target player, distance, and estimated arrival time in minutes. |
/snail remove |
Removes the snail entity from the world until respawned. |
/snail respawn here |
Respawns the snail directly at your position. |
/snail respawn nearby |
Respawns the snail 5 blocks in front of your direction. |
/snail respawn random |
Generates a new spawn location within the configured distance range. |
/snail respawn <x y z> |
Respawns the snail at specific coordinates (supports ~ relative positioning). |
/snail reload |
Reloads config/immortalsnail-common.toml without restarting the server. |
Configuration
Configuration file located at config/immortalsnail-common.toml (generated on first boot, reloadable via /snail reload):
| Section / Key |
Default |
Description |
snail: minDistance / maxDistance |
5000 / 50000 |
Spawn distance range from world origin. |
snail: speedBlocksPerMinute |
1.0 |
Base ground movement speed. |
snail: canClimbWalls / climbSpeedMultiplier |
true / 3.0 |
Wall/ceiling climbing toggle and speed multiplier relative to ground speed. |
snail: canBreakBlocks |
true |
Toggles whether the snail chews through terrain when blocked. |
snail: breakSpeedBlocksPerSecond |
0.0167 |
Block destruction rate (defaults to one block per minute). |
snail: breakBlocksWhitelist / breakBlocksBlacklist |
[] / [bedrock, obsidian, end_portal_frame] |
Allowed and blocked terrain destruction lists. If a whitelist is set, only listed blocks can be broken; the blacklist overrides whitelist settings. |
snail: stuckBreakAfterTicks |
1200 |
Idle duration (in ticks) before block destruction begins. |
snail: chunkForceRadius |
1 |
Radius of loaded chunks maintained around the snail. |
starter: giveStarterShulker, includeFoodInStarter, includeBasicMaterials |
true |
Toggles for individual components of the starter kit. |
starter: bargainShulkerCount / bargainShulkerSize |
2 / 27 |
Number of custom reward shulker boxes and their inventory slot size. |
death: banOnSnailKill |
true |
Determines if dying to the snail results in a server ban. |
death: banMessage |
"The snail caught you." |
The kick/ban screen message displayed to banned players. |
death: totemsWorkAgainstSnail |
true |
Controls whether Totems of Undying protect players against snail damage. |
commandAllowedPlayers |
[] |
List of non-operator players permitted to run /snail commands. |
Compatibility and requirements
This mod adds one entity, one custom screen, and three network packets without modifying world generation or base game logic outside of the initial bargain prompt.
- Dependencies: Fabric Loader (≥ 0.19.0 on 26.2), Fabric API, and Cloth Config.
- JEI Integration: Optional. The item selection window works without JEI, but installing JEI allows drag-and-drop item selection directly into bargain slots.
- Installation: Required on both the server and all connecting clients to render the custom menu.
评论 0
登录后参与评分
还没有评论,来抢沙发吧