Helmet Crab(头盔蟹)
事实基准:
/Users/evlos/a/mirror/twilightforest(minecraftVersion = 1.7.10)逐行读源码。
基本信息
| 属性 | 值 | 来源 |
|---|---|---|
| 注册实体名 | TwilightForest:Helmet Crab |
TwilightForestMod.java:680-685 |
| 实体 ID 常量 | idMobHelmetCrab = 223 |
TwilightForestMod.java:1125 |
| 类 | twilightforest.entity.EntityTFHelmetCrab |
entity/EntityTFHelmetCrab.java(155 行) |
| 父类 | net.minecraft.entity.monster.EntityMob |
同上 :25 |
| 生物属性 | EnumCreatureAttribute.ARTHROPOD |
同上 :138-140 |
| 尺寸 | setSize(0.8F, 1.1F) |
同上 :31 |
| 蛋色 | 主 0xfb904b / 副 0xd3e7bc |
TwilightForestMod.java:684-685 |
| 所属结构 | 骑士要塞(tfStronghold 特性 ID 15) |
TFFeature.java:189 |
数值
| 属性 | 值 | 来源 |
|---|---|---|
maxHealth |
13.0 | EntityTFHelmetCrab.java:68 |
movementSpeed |
0.28 | 同上 :69 |
attackDamage |
3.0 | 同上 :70 |
| 额外护甲 | +6 点,上限 20 | 同上 :145-152 |
| 每区块生成上限 | 8 | 同上 :130-133 |
生成权重
TFFeature.java:189:tfStronghold.addMonster(EntityTFHelmetCrab.class, 10, 4, 4)
—— 权重 10,群体 4–4(每次固定 4 只)。
AI 行为 / 特殊机制
isAIEnabled() 恒为 true(:57-60)。任务表(:33-40):
| 优先级 | 任务 | 行号 |
|---|---|---|
| 0 | EntityAISwimming |
:33 |
| 2 | EntityAILeapAtTarget(this, 0.28F) |
:34 |
| 3 | EntityAIAttackOnCollide(EntityPlayer, 1.0D, false) |
:35 |
| 6 | EntityAIWander(this, 1.0D) |
:36 |
| 7 | EntityAIWatchClosest(EntityPlayer, 8.0F) |
:37 |
| 7 | EntityAILookIdle |
:38 |
targetTasks:EntityAIHurtByTarget(优先级 1)与
EntityAINearestAttackableTarget(EntityPlayer, 0, true)(优先级 2)(:39-40)。
「Helmet」机制:无甲时也有 +6 点护甲(getTotalArmorValue,:145-152),
对应其戴头盔的外形;源码中没有卸下头盔的逻辑。
音效:getLivingSound() 返回 null(:74-76,即完全无声),
受伤与死亡复用原版蜘蛛音效 mob.spider.say / mob.spider.death(:82、:89),
脚步为 mob.spider.step 音量 0.15(:95-97)。
掉落:getDropItem() 返回 TFItems.armor_shard(:102-104)——
对应 Armor Shard(装甲碎片);
dropFewItems 另有 50% 概率掉 1 + looting 个 Items.fish(:107-113)。
不掉 TwilightForest:trophy。
成就:暮色森林维度玩家击杀触发 twilightHunter(:119-125)。
相关条目
- Armor Shard(装甲碎片) - 本实体的主掉落
- Twilight Kobold(暮色狗头人) - 同在骑士要塞刷出的近战小怪
- 暮色森林世界生成特性(TFFeature) -
tfStronghold特性 ID 15