Forest Squirrel(林中松鼠)
事实基准:
/Users/evlos/a/mirror/twilightforest(minecraftVersion = 1.7.10)逐行读源码。
基本信息
| 属性 | 值 | 来源 |
|---|---|---|
| 注册实体名 | TwilightForest:Forest Squirrel |
TwilightForestMod.java:528-532 |
| 实体 ID 常量 | idMobSquirrel = 195 |
TwilightForestMod.java:1098 |
| 蛋色 | 主 0x904f12 / 副 0xeeeeee |
TwilightForestMod.java:531-532 |
| 注册形式 | TFCreatures.registerTFCreature → 追踪 80 / 更新 3 |
TFCreatures.java:23、TwilightForestMod.java:528 |
| 类 | twilightforest.entity.passive.EntityTFSquirrel(118 行) |
entity/passive/EntityTFSquirrel.java:22 |
| 父类 | net.minecraft.entity.EntityCreature(implements IAnimals) |
同上 :22 |
| 体型 | setSize(0.3F, 0.7F),stepHeight = 1 |
同上 :27、:30 |
| 所属结构 | 不属于任何结构,仅在暮色森林基础群系刷怪表,权重 10、2~4 只 | biomes/TFBiomeBase.java:122 |
数值
| 属性 | 值 | 来源 |
|---|---|---|
maxHealth |
1.0 | EntityTFSquirrel.java:51 |
movementSpeed |
0.3 | 同上 :52 |
getRenderSizeModifier |
0.3F | 同上 :75 |
寻路权重 leaves |
12.0F | 同上 :86-88 |
寻路权重 wood |
15.0F | 同上 :89-91 |
寻路权重 grass |
10.0F | 同上 :92-94 |
| 其它方块寻路权重 | getLightBrightness - 0.5F |
同上 :96 |
惊吓逃逸速度 EntityAIPanic |
1.38F | 同上 :35 |
| 规避玩家速度区间 | 1.25F ~ 2.0F | 同上 :37 |
| 追踪距离 / 更新频率 | 80 / 3 | TFCreatures.java:23 |
attackDamage:源码中未设置,EntityTFSquirrel.java全文无attackDamage, 本类也没有任何攻击型 AI(无IMob),因此不存在该属性。
AI 行为 / 特殊机制
任务表(:34-41):0 EntityAISwimming;1 EntityAIPanic(1.38F);
2 EntityAITempt(1.0F, Items.wheat_seeds, true);
3 EntityAIAvoidEntity(EntityPlayer, 2.0F, 0.8F, 1.4F);
5 EntityAIWander(1.0F);6 EntityAIWander(1.25F);
7 EntityAIWatchClosest(EntityPlayer, 6F);8 EntityAILookIdle。
⚠️ 优先级 4 被跳过 —— 源码里是
0,1,2,3,5,6,7,8,4 号位空缺。 同时有两个EntityAIWander(5 号 1.0F 与 6 号 1.25F),后者永远抢不到执行权 (同优先级 5 的任务会被移到末尾,实际是 5 号先跑完再轮到 6 号)。
偏好树冠:getBlockPathWeight 优先选择站在树叶(12.0F)上的落点,木头 15.0F、
草地 10.0F,其余按亮度(:82-97)。getNavigator().setAvoidsWater(true)(:33)。
免疫坠落伤害:fall(float) 覆写为空方法体(:59-60),可从任意高度落下。
永不消失:canDespawn() 返回 false(:102-105),远处也不会被清理。
AI 恒开:isAIEnabled() 返回 true(:65-68)。
成就:暮色森林维度内被玩家击杀触发 twilightHunter(:110-117)。
掉落:本类未覆写 getDropItem,源码中没有任何掉落定义。
相关条目
- Tiny Bird(微小鸟) - 同刷怪表的另一只林间小鸟
- Forest Bunny(兔子) - 同刷怪表
- Wild Deer(野鹿) - 同刷怪表的大型食草动物