配置项总览(config-overview)
基本信息
| 属性 | 值 |
|---|---|
| 配置文件 | config/SpecialAI.cfg |
| 注册类 | toast.specialAI.Properties |
| 分类数 | 6 |
Special AI 的所有功能必须通过该配置文件调整,默认配置即可正常工作。所有键的命名规则
<category>@<field>内部以HashMap缓存。
通用配置(_general)
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
avoid_explosions |
boolean | true | 所有生物尝试远离 TNT/即将爆炸的爬行者 |
break_speed |
double (0.0–∞) | 0.5 | 实体破坏方块速度倍率(相对玩家) |
call_for_help |
boolean | true | 受伤时同种生物前来支援 |
call_for_help_on_death |
double (0.0–1.0) | 0.2 | 死亡时触发支援的概率 |
depacify_aggressive_chance |
double (0.0–1.0) | 0.005 | depacify 列表生物变为主动攻击而非中立的概率 |
depacify_list |
string | Chicken,Cow,Pig,Sheep |
哪些被动生物会反击;可用 ~ 前缀锁定具体类 |
eat_breeding_items |
boolean | true | 被动生物会捡食其育种物品 |
eating_heals |
boolean | true | 捡到育种物品时像狼一样回血 |
骑乘系统(jockeys)
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
_rider_chance |
double (0.0–1.0) | 0.1 | 骑手列表生物获得骑乘 AI 的概率 |
mount_list |
string | Spider,Pig,Sheep,Cow |
普通尺寸骑手可骑的生物 |
mount_list_small |
string | Chicken |
小骑手可骑的生物 |
rider_list |
string | Zombie,Skeleton,Creeper |
可作为普通骑手的生物 |
rider_list_small |
string | (空) | 仅可作为小骑手的生物 |
被动破坏(passive_griefing)
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
_enabled |
boolean | true | 全局开关 |
break_lights |
boolean | true | 自动瞄准所有光强>1 的方块 |
break_sound |
boolean | false | 破坏时播放全距离可听的折断声 |
grief_range |
double (0.0–∞) | 3.5 | 实体从眼睛高度可触及方块的最大距离 |
grief_scan_range |
int (>=0) | 12 | 横向扫描方块半径 |
grief_scan_range_vertical |
int (>=0) | 6 | 垂直扫描方块半径 |
leave_drops |
boolean | true | 破坏后方块是否掉物品 |
mad_creepers |
boolean | true | 爬行者破坏时直接自爆(不挖方块) |
mob_list |
string | Zombie,Creeper |
启用被动破坏的生物列表 |
requires_tools |
boolean | false | 仅当持有正确工具时才破坏 |
scan_count |
int (>=1) | 24 | 每 3 tick 每实体扫描的方块数 |
scan_count_global |
int (>=0) | 0 | 全局每 tick 总扫描上限(0=不限) |
target_blacklist |
string | (空) | 不破坏的方块白名单/黑名单 |
target_blocks |
string | farmland,bed,crafting_table,wooden_door,trapdoor,fence_gate,ladder |
主动破坏的方块列表(支持 metadata:cake 0 仅瞄准完整蛋糕) |
target_fiddling_blacklist |
string | (空) | fiddling 黑名单 |
target_fiddling_blocks |
string | lever,wooden_button,stone_button,unpowered_comparator,powered_comparator,unpowered_repeater,powered_repeater,cake |
可翻动的方块 |
方块列表支持命名空间通配符:
<namespace>:*启用整个 mod 方块。
特殊 AI 模式(special_ai)
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
_chance_1 |
double (0.0–1.0) | 0.05 | mob_list_1 触发特殊 AI 的概率 |
_chance_2 |
double (0.0–1.0) | 0.05 | mob_list_2(可叠加) |
_chance_3 |
double (0.0–1.0) | 0.2 | mob_list_3(可叠加) |
_mob_list_1 |
string | Zombie,Skeleton |
可获得特殊 AI 的生物(默认 5%) |
_mob_list_2 |
string | Zombie |
同上(5%) |
_mob_list_3 |
string | Skeleton |
同上(20%) |
ai_<name> |
int (>=0) | 1 | 每种特殊 AI 的权重(见 special-ai-index) |
AI_WEIGHT = Σ weights,若AI_WEIGHT == 0则跳过特殊 AI 分配。
村庄系统(villages)
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
block_aggression_chance |
double (0.0–1.0) | 0.1 | 非白名单方块被打碎时,玩家被标记为攻击者的概率 |
block_aggression_limit |
int (-30–+10) | -5 | block_aggression_chance 仅当玩家声誉 ≤ 该值时触发 |
block_blacklist |
string | 见 village-block-list | 不引发敌意的方块 |
block_rep_loss_chance |
double (0.0–1.0) | 0.1 | 非白名单方块被打碎时掉 1 声誉的概率 |
block_rep_loss_limit |
int (-30–+10) | 8 | 触发 block_rep_loss_chance 的声誉上限 |
block_special_aggression_chance |
double (0.0–1.0) | 1.0 | block_special_list 中方块被打碎时,玩家被标记为攻击者的概率 |
block_special_list |
string | emerald_block |
特殊方块列表(独立几率) |
block_special_rep_loss_chance |
double (0.0–1.0) | 1.0 | 特殊方块被打碎时掉 1 声誉的概率 |
block_whitelist |
string | (空) | 若非空,仅这些方块会引发敌意 |
help_rep_chance |
double (0.0–1.0) | 0.2 | 在村庄附近击杀怪物时,玩家获得 +1 声誉的概率 |
house_rep |
boolean | true | 新增房屋时村庄对附近玩家 +1 声誉,移除房屋时 -1 |
refresh_houses |
boolean | true | 房屋被加入村庄后永久保留(直到门被毁或村民全死) |
villagers_defend |
boolean | true | 村民主动攻击村庄攻击者及声誉差(≤ -15)的玩家 |
取值接口
Properties.getBoolean(category, field); // boolean
Properties.getInt(category, field); // int
Properties.getDouble(category, field); // double
Properties.getString(category, field); // String
数值属性可作 getBoolean:int == 0 视为 false,否则按 (1 / value) 概率返回 true。布尔属性可作 getInt / getDouble:true→1 / 1.0。