跳到正文

Cobblemon TP-Pastures

作者:datibrr

更改 Cobblemon 牧场召回和传送机制:宝可梦走得太远时,不再被召回到电脑,而是传送回牧场方块附近。

收藏

截图

介绍

介绍由机器翻译自 CurseForge 原页面,仅供参考。

Cobblemon TP-Pastures

防止放牧的宝可梦因走得太远而被召回到电脑中。它们会被传送回放牧方块附近。

该模组包含自动半径配置、安全着陆检测、坠落伤害保护、可配置的伤害免疫、危险状态清除、可选传送效果以及管理命令。

适用于 Minecraft 1.21.1 的 Fabric 和 NeoForge。

服务端

该模组在单人游戏和多人游戏中均可使用。

在多人服务器中,这是一个服务端模组,因此只需安装在服务器上。请下载与你的服务器模组加载器相匹配的 Fabric 或 NeoForge 版本。

为什么要使用它?

  • 防止宝可梦走得太远后,你的放牧方块里突然几乎空无一物。
  • 无需再用围栏困住宝可梦,只为防止它们被召回。
  • 根据 Cobblemon 的配置自动调整传送半径。
  • 保护宝可梦免受传送回来时造成的坠落伤害。
  • 通过可配置的白名单或黑名单保护放牧的宝可梦免受伤害。
  • 传送后清除燃烧、溺水和冻结状态。
  • 改善与Cobbleworkers的兼容性,使其运行更加可靠。
  • 让你能更自由地将放牧的宝可梦用于装饰、动物园、野生动物园、农场及类似建筑。

你也可以使用Cobblemon: SafePastures来保护宝可梦免受伤害。

由于 TP-Pastures 现在已包含对分配到放牧方块的宝可梦的可配置伤害免疫,因此不再需要 SafePastures 来提供伤害保护。

Cobblemon 1.8.0 试图解决放牧的宝可梦消失或逃跑的问题,但宝可梦离开允许活动的区域后仍可能被召回到电脑中。因此,TP-Pastures 仍可用于防止这种情况发生。

依赖项

所有版本均需要:

Fabric 版本:

NeoForge 版本:

配置

配置文件位于此处:

...\config\cobblemon_tp_pastures.json

自动半径配置

默认情况下,TP-Pastures 会自动读取 Cobblemon 的pastureMaxWanderDistance设置,并减去配置的radiusMargin。

默认的radiusMargin为4。

示例:

  • Cobblemon 半径32 → TP-Pastures 半径28
  • Cobblemon 半径64 → TP-Pastures 半径60

这意味着通常只需更改 Cobblemon 的pastureMaxWanderDistance。TP-Pastures 会自动调整其实际传送半径。

Cobblemon 的该项数值通常可以在这里找到:

...\config\cobblemon\main.json

Cobblemon 1.8.0 将默认pastureMaxWanderDistance从64改为32。启用自动半径配置后,TP-Pastures 会自动将其实际半径从60调整为28。

如果无法读取 Cobblemon 的配置,则会使用maxPastureRadius作为备用值。

手动半径配置

若要改用固定半径,请设置:

"automaticRadius": false

此时,TP-Pastures 将使用maxPastureRadius中配置的数值。

使用手动模式时,务必确保 TP-Pastures 的maxPastureRadius小于 Cobblemon 的pastureMaxWanderDistance。否则,Cobblemon 可能会在 TP-Pastures 将宝可梦传送回来之前先把它召回。

使用更大的放牧半径

启用自动半径配置后,你只需增大 Cobblemon 的 pastureMaxWanderDistance。

例如:

"pastureMaxWanderDistance": 64

默认 radiusMargin 为 4 时,TP-Pastures 会自动使用 60 的有效半径。

如果想让 TP-Pastures 更早或更晚传送宝可梦,可以更改 radiusMargin。

从旧版本更新

更新时会保留现有配置文件。

加载配置时会自动添加新设置。旧的 maxPastureRadius 值可能仍保留在文件中,但只有在启用 automaticRadius 时才会作为备用值使用。

使用自动半径配置时,无需再手动将旧半径(例如 54)改为 28。

伤害保护

默认情况下,当前分配给牧场方块的宝可梦不会受到任何伤害。

可通过以下设置自定义伤害保护:

  • invulnerablePasturedPokemon
  • damageFilterMode
  • damageTypes

黑名单模式

BLACKLIST会阻止 damageTypes 中列出的伤害类型。

默认的通配符配置会阻止所有伤害:

"damageFilterMode": "BLACKLIST",
"damageTypes": [
  "*"
]

如果只想阻止特定伤害类型,可以将 * 替换为单独的 Minecraft 伤害类型 ID:

"damageTypes": [
  "minecraft:in_fire",
  "minecraft:on_fire",
  "minecraft:fall"
]

白名单模式

WHITELIST允许 damageTypes 中列出的伤害类型,并阻止所有其他伤害。

例如,以下设置允许摔落伤害,同时阻止其他伤害:

"damageFilterMode": "WHITELIST",
"damageTypes": [
  "minecraft:fall"
]

将 invulnerablePasturedPokemon 设为 false 可完全关闭常规伤害保护。

仍可通过 preventTeleportFallDamage 单独阻止与传送相关的摔落伤害。

命令

  • /tppastures — 显示当前配置状态。
  • /tppastures status — 显示有效半径和已启用的保护设置。
  • /tppastures reload — 无需重启服务器即可重新加载配置。需要权限等级 2(服务器管理员)。

默认配置

{
  "_automaticRadius_info": "If true, the teleport radius is automatically set to Cobblemon's pastureMaxWanderDistance minus radiusMargin. maxPastureRadius is used as a fallback if Cobblemon's config is unavailable. Default: true.",
  "automaticRadius": true,
  "_radiusMargin_info": "How many blocks are subtracted from Cobblemon's pastureMaxWanderDistance in automatic mode. Default: 4.",
  "radiusMargin": 4,
  "_maxPastureRadius_info": "Manual teleport radius and fallback for automatic mode. Must be lower than Cobblemon's pastureMaxWanderDistance. Default: 28.",
  "maxPastureRadius": 28,
  "_useHorizontalDistanceOnly_info": "If true, only horizontal (X/Z) distance is checked, ignoring height. Good for pastures near cliffs or multi-level farms. If false, full 3D sphere distance is used. Default: false.",
  "useHorizontalDistanceOnly": false,
  "_candidateTeleportAttempts_info": "How many random positions around the pasture block are tried when searching for a safe landing spot (solid ground + clear headroom). Higher values reduce the chance of landing inside a block, at a tiny performance cost. Default: 24.",
  "candidateTeleportAttempts": 24,
  "_fallbackYOffset_info": "If no safe position is found after candidateTeleportAttempts tries, the Pokémon is placed this many blocks directly above the pasture block as a last resort. Default: 1.5.",
  "fallbackYOffset": 1.5,
  "_debugLogging_info": "If true, nearby players see a chat message whenever a Pokémon is teleported back (e.g. 'Pikachu left tether box → (x, y, z)'). Default: false.",
  "debugLogging": false,
  "_serverLogging_info": "If true, teleport events are written to the server log. Disable this if the log spam is unwanted. Default: false.",
  "serverLogging": false,
  "_preventTeleportFallDamage_info": "If true, a Pokémon teleported back by TP-Pastures takes no fall damage from that teleport. Protection lasts until it lands. Default: true.",
  "preventTeleportFallDamage": true,
  "_invulnerablePasturedPokemon_info": "If true, damage to Pokémon currently assigned to a Pasture Block is filtered using damageFilterMode and damageTypes. Default: true.",
  "invulnerablePasturedPokemon": true,
  "_damageFilterMode_info": "BLACKLIST prevents the damage types listed in damageTypes. WHITELIST allows only the damage types listed in damageTypes. Use Minecraft damage type IDs such as minecraft:in_fire. Default: BLACKLIST.",
  "damageFilterMode": "BLACKLIST",
  "_damageTypes_info": "Damage type IDs used by damageFilterMode. The wildcard * matches every damage type. Default: [\"*\"] (all damage is prevented).",
  "damageTypes": [
    "*"
  ],
  "_clearHazardousStatesAfterTeleport_info": "If true, fire, drowning and freezing states are cleared after TP-Pastures teleports a Pokémon. Default: true.",
  "clearHazardousStatesAfterTeleport": true,
  "_teleportParticles_info": "If true, portal particles are shown at the old and new position when a Pokémon is teleported. Default: false.",
  "teleportParticles": false,
  "_teleportSounds_info": "If true, an Enderman teleport sound is played at the old and new position when a Pokémon is teleported. Default: false.",
  "teleportSounds": false
}

支持/错误报告

我目前没有使用专门的平台来提供支持或接收错误报告。
如果你需要帮助或想要报告问题,可以通过 Discord 联系我:@datibrr

常见问题

Cobblemon TP-Pastures 支持哪些 Minecraft 版本?

Cobblemon TP-Pastures 支持 Minecraft Java 版 1.21.1,可用的加载器:Fabric / NeoForge。下载时注意选择和你游戏版本一致的文件。

Cobblemon TP-Pastures 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

datibrr 的其他作品

查看全部 →