Twilight Kobold(暮色狗头人)
事实基准:
/Users/evlos/a/mirror/twilightforest(minecraftVersion = 1.7.10)逐行读源码。
基本信息
| 属性 | 值 | 来源 |
|---|---|---|
| 注册实体名 | TwilightForest:Twilight Kobold |
TwilightForestMod.java:549-554 |
| 实体 ID 常量 | idMobKobold = 199 |
TwilightForestMod.java:1102 |
| 类 | twilightforest.entity.EntityTFKobold |
entity/EntityTFKobold.java(168 行) |
| 父类 | net.minecraft.entity.monster.EntityMob |
同上 :24 |
| 尺寸 | setSize(0.8F, 1.1F) |
同上 :32 |
| 蛋色 | 主 0x372096 / 副 0x895d1b |
TwilightForestMod.java:553-554 |
| 所属结构 | 空心树丘 / 骑士要塞 / 最终城堡 | 见下「生成权重」 |
数值
| 属性 | 值 | 来源 |
|---|---|---|
maxHealth |
13.0 | EntityTFKobold.java:74 |
movementSpeed |
0.28 | 同上 :75 |
attackDamage |
4.0 | 同上 :76 |
| 观察距离 | 8.0F | 同上 :42 |
群聚速度 EntityAITFFlockToSameKind |
1.0D | 同上 :40 |
惊慌范围 EntityAITFPanicOnFlockDeath |
2.0F | 同上 :37 |
| 跳跃系数 | 0.3F | 同上 :38 |
| 每区块生成上限 | 8 | 同上 :163-166 |
生成权重(跨结构,是本 mod 分布最广的小怪之一)
| 位置 | 代码 | 权重 / 群体 | 行号 |
|---|---|---|---|
小型空心树丘 hill1 |
addMonster(EntityTFKobold.class, 10, 4, 8) |
10 / 4–8 | TFFeature.java:136 |
中型空心树丘 hill2 |
同上 | 10 / 4–8 | TFFeature.java:140 |
骑士要塞 tfStronghold |
同上 | 10 / 4–8 | TFFeature.java:192 |
最终城堡普通层 finalCastle |
addMonster(EntityTFKobold.class, 10, 4, 4) |
10 / 4–4 | TFFeature.java:211 |
| 最终城堡内部层 | addMonster(1, EntityTFKobold.class, 10, 4, 4) |
10 / 4–4 | TFFeature.java:217 |
| 暗之森林群系 | SpawnListEntry(EntityTFKobold.class, 10, 4, 8) |
10 / 4–8 | biomes/TFBiomeDarkForest.java:63 |
| 通用地下刷怪 | undergroundMonsterList.add(... 10, 4, 8) |
10 / 4–8 | biomes/TFBiomeBase.java:134 |
⚠️
hill3(大型空心树丘,TFFeature.java:151-160)没有 Kobold 条目;TFFeature.java:738另有一段new EntityTFKobold(world)的提示向导逻辑。
AI 行为 / 特殊机制
isAIEnabled() 恒为 true(:63-66)。任务表(:36-43):
| 优先级 | 任务 | 行号 |
|---|---|---|
| 0 | EntityAISwimming |
:36 |
| 1 | EntityAITFPanicOnFlockDeath(this, 2.0F) |
:37 |
| 2 | EntityAILeapAtTarget(this, 0.3F) |
:38 |
| 3 | EntityAIAttackOnCollide(EntityPlayer, 1.0D, false) |
:39 |
| 4 | EntityAITFFlockToSameKind(this, 1.0D) |
:40 |
| 6 | EntityAIWander(this, 1.0D) |
:41 |
| 7 | EntityAIWatchClosest(EntityPlayer, 8.0F) |
:42 |
| 7 | EntityAILookIdle |
:43 |
targetTasks:EntityAIHurtByTarget(优先级 1)与
EntityAINearestAttackableTarget(EntityPlayer, 0, true)(优先级 2)(:44-45)。
两个暮色森林专属 AI 任务(twilightforest.entity.ai 包):
EntityAITFPanicOnFlockDeath—— 同类死亡时触发惊慌(:37)。EntityAITFFlockToSameKind—— 向同类靠拢(:40)。
惊慌状态:数据观察器下标 17(entityInit :54-58),
setPanicked(true) 写入字节 127、false 写入 0(:116-122)。
惊慌时每 tick 放 2 个 splash 粒子(:133-144,源码注释
// when panicked, spawn tears/sweat)。
另有 isShy() 返回 shy && recentlyHit <= 0(:108-110),
shy 在构造时固定为 true(:34)且没有任何 setter,因此恒为真。
掉落:getDropItem() 返回 Items.wheat(:95-97);
dropFewItems 另有 50% 概率掉 1 + looting 个 Items.gold_nugget(:100-106)。
不掉落 TwilightForest 物品,也不掉 trophy。
音效:mob.kobold.kobold / mob.kobold.hurt / mob.kobold.die(:79-92)——
三者均带 TwilightForestMod.ID(TwilightForestMod.java:75 的 "TwilightForest")前缀。
成就:暮色森林维度玩家击杀触发 twilightHunter(:151-158)。
未实装部分:this.moveSpeed = 0.28F; 被注释(:31),
移速实际来自 applyEntityAttributes。
相关条目
- King Spider(蛛王) - 同在暗之森林群系刷出
- Helmet Crab(头盔蟹) - 同在骑士要塞刷出
- 暮色森林世界生成特性(TFFeature) - 本实体的 5 处结构生成条目