介绍
Attribute Base Modifier (ABM) allows you modify the default base value of any attribute of any mob.
This mod is server-side.
| Side | Required to install |
| ——————– | ——————- |
| Dedicated server | True |
| Integrated server | True |
| Single-player client | True |
| Pure client | False |
This mod is data-driven. It’s recommended to read Data pack – Minecraft Wiki if you encounter issue.
You can define multiple rules in the data pack to apply modifiers.
Register Rules
Rules are registered by JSON files in the data pack.
The rule file should be in data/<namespace>/abm_rules/<name>.json.
If the rule is successfully registered, its ID will be <namespace>:<name>.
Like other data pack contents, all rules will be reloaded when the server reloads data. Specifically, when reload the world or use reload command.
JSON format:
<root>Compound{}includeCompound{} A include filter. Only the type specified here will be included. Optional, all type of mobs will be included if omitted.typeString | Array[] List the mobs that need to be included.- String either an ID or a tag(starts with
#). e.g.minecraft:zombie,#minecraft:undead. spawn_groupString This means all mobs of this spawn group is included. Must be one ofmonster,creature,ambient,water_creature,underground_water_creature,water_ambient,misc, oraxolotls. Has no effect when coexists withtype.excludeCompound{} A exclude filter. The format is the same asinclude. Optional, no mobs will be excluded if omitted.modifiesArray[] Defines the modification methods.- Compound{} Define an attribute and the modification methods. If the mob lacks default value of this attribute, this modification will be skipped.
attributeString ID of the attribute . e.g.minecraft:max_health.modifiersArray[] The modification methods. The base values are calculated sequentially in order.- Compound{} A modification method.
typeString The type of modification(operator). Must be one ofset,addormultiply.valueNumber The value of this modification. Will be parsed as a double value.default_enableBoolean Whether to enable this rule by default. See “Debug Command” for more information. Optional, defaults totrue.
Example: (some IDs may be not correct)
{
"include": {
"spawn_group": "monster"
},
"exclude": {
"type": "#c:bosses"
},
"modifies": [
{
"attribute": "minecraft:max_health",
"modifiers": [
{
"type": "add",
"value": 100
}
]
},
{
"attribute": "minecraft:armor",
"modifiers": [
{
"type": "set",
"value": 10
}
]
}
]
}
Here is an example_data_pack.
Debug Command
abmrule <rule_id> [enable|disable]
You can enable or disable a rule by this command.
This command is for debugging.
When the rule is reloaded, this state will be reset to its default value. Specifically. the default_enable defined in the rule’s JSON file.
FAQ
- Some mob is not modified after reload the rules using
reloadcommand.
This is an expected behavior.
After a reload, a previously summoned mob may not update its default attributes unless it’s “recreated” in the code (typically when mob’s chunk is loaded).
However, it’s recommended to summon a new mob to reduce uncertainty and ensure it has the latest default attributes.
If you want a previously summoned mob updates, it’s recommended to re-enter the world.
- How to define rules before creating a world, just like a config?
In certain situations, such as when making mod packs, many people encounter this problem.
It’s recommended to make a global data pack through a low-code mod or Paxi.
常见问题
Attribute Base Modifier 支持哪些 Minecraft 版本?
Attribute Base Modifier 支持 Minecraft Java 版 1.20–1.21.8,共 16 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
Attribute Base Modifier 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
whyvo 的其他作品
查看全部 →
Slide Show Pro
A simple slideshow(pro) projector in Minecraft.
Chat Screen
A modern chat screen in Minecraft
Dynamic In-Game NBT Editor
Edit NBT dynamically and multis-creen.
Chaos World
Add a list of weapons with great abilities. A struction and a powerful boss.
评论
登录后评论和评分