这是由 ZeithComms(以及我本人)在 1.12.2 版本中开发的原始 CMT 模组的移植版。
这是一个轻量级的服务端模组,允许整合包制作者和服务器管理员配置任意生物去攻击任何其他活体实体——包括玩家、被动生物以及模组添加的生物。
可以为被动生物赋予近战和远程攻击能力,使其具备攻击性。
所有内容均通过简单的 JSON 配置文件进行控制。无需编写代码,无需数据包,也无需依赖项。
功能特性:
- 任意生物可攻击任意其他生物 —— 苦力怕攻击绵羊、僵尸攻击骷髅、牛攻击鸡——只有你想不到的,没有做不到的
- 为被动生物提供近战攻击 —— 让绵羊、牛、猪等获得可配置的近战攻击力
- 远程攻击 —— 支持 10 种投射物类型:箭矢、火球、凋灵头颅、潜影贝子弹等
- 可配置伤害 —— 针对近战和远程(箭矢类)攻击的伤害数值均可自定义
- 开箱即用支持模组生物 —— 只需使用其注册表 ID(例如 "modid:entity_name")即可
- 多配置文件支持 —— 可以使用单个文件,也可以拆分为多个文件;支持单对象或数组格式
- 热重载 —— 使用 "/cmt reload" 命令即可应用配置更改,无需重启服务器
- 零依赖 —— 直接放入即可运行(本模组在不配置的情况下不会执行任何操作,内置的示例文件虽然不会触发任何效果,但展示了如何配置目标)
首次启动时,模组会在 config/CustomMobTargets/ 目录下创建以下文件:
targets.json — 你的配置文件(初始为空,请在此处添加条目)
__examples.json — 供参考的示例配置(不会被加载 —— 以 __ 开头的文件会被忽略)
__README.txt — 所有配置字段的完整文档说明
打开 targets.json 并添加你的条目。在游戏中使用 /cmt reload 即可即时应用更改。
常见问题解答 (FAQ)
这个模组是否支持模组生物?
是的。请使用模组的注册表 ID,例如 "alexsmobs:grizzly_bear" 或 "twilightforest:naga"。
我能让生物攻击玩家吗?
可以。将目标实体设置为 "minecraft:player" 即可。
我可以使用多个配置文件吗?
可以。CustomMobTargets 文件夹中的任何 .json 文件都会被加载(以 __ 开头的文件除外)。每个文件可以包含单个条目或一个条目数组。
仅限服务端吗?
是的。仅需在服务端安装,客户端不需要安装。当然,你也可以在单人游戏中正常使用。
原版 链接
This is a port of the original 1.12.2 CMT mod by ZeithComms (and me).
A lightweight, server-side mod that lets modpack makers and server owners configure any mob to target and attack any other living entity — including players, passive mobs, and modded entities.
Passive mobs can be given melee and ranged attacks to become able to attack.
Everything is controlled through simple JSON config files. No coding, no datapacks, no dependencies.
Features:
- Any mob can target any mob — creepers vs sheep, zombies vs skeletons, cows vs chickens — you name it
- Melee attacks for passive mobs — give sheep, cows, pigs, etc. a configurable melee attack
- Ranged attacks with 10 projectile types — arrows, fireballs, wither skulls, shulker bullets, and more
- Configurable damage for melee and ranged (arrow-type) attacks
- Works with modded mobs out of the box — just use their registry ID (e.g. "modid:entity_name")
- Multiple configs — use one file or split across many, single object or array format
- Hot-reload — use the "/cmt reload" command to apply config changes without restarting the server
- Zero dependencies — just drop it in and go (this mod does nothing without configuration, there is an example file included that will not do anything, but shows how to configure a target)
On first launch, the mod creates a config/CustomMobTargets/ folder containing:
targets.json — your config file (starts empty, add your entries here)
__examples.json — example configs for reference (NOT loaded — files starting with __ are ignored)
__README.txt — full documentation of every config field
Open targets.json and add your entries. Use /cmt reload in-game to apply changes instantly.
FAQ
Does this work with modded mobs?
Yes. Use the mod's registry ID, e.g. "alexsmobs:grizzly_bear" or "twilightforest:naga".
Can I make mobs target players?
Yes. Use "minecraft:player" as the target entity.
Can I use multiple config files?
Yes. Any .json file in the CustomMobTargets folder is loaded (except files starting with __). Each file can contain a single entry or an array of entries.
Server-side only?
Yes. Only needs to be installed on the server. Clients don't need it. You can also use it for singleplayer just fine.
Link to original
评论 0
登录后参与评分
还没有评论,来抢沙发吧