Pinch Beetle(枯萎甲虫)
事实基准:
/Users/evlos/a/mirror/twilightforest(minecraftVersion = 1.7.10)逐行读源码。
基本信息
| 属性 | 值 | 来源 |
|---|---|---|
| 注册实体名 | TwilightForest:Pinch Beetle |
TwilightForestMod.java:592-597 |
| 实体 ID 常量 | idMobPinchBeetle = 208 |
TwilightForestMod.java:1110 |
| 蛋色 | 主 0xbc9327 / 副 0x241609 |
TwilightForestMod.java:596-597 |
| 类 | twilightforest.entity.EntityTFPinchBeetle(259 行) |
entity/EntityTFPinchBeetle.java:26 |
| 父类 | net.minecraft.entity.monster.EntityMob |
同上 :26 |
| 生物属性 | EnumCreatureAttribute.ARTHROPOD |
EntityTFPinchBeetle.java:207-210 |
| 体型(无骑乘) | setSize(1.2F, 1.1F) |
EntityTFPinchBeetle.java:32、:126 |
| 体型(载着人) | setSize(1.9F, 2.0F) |
EntityTFPinchBeetle.java:117 |
眼高 getEyeHeight |
0.25F | EntityTFPinchBeetle.java:200-202 |
| 所属结构 | 大型空心丘陵 ID 3 / 迷宫 ID 13 / 黑暗高塔 ID 14,三处刷怪表 | TFFeature.java:158、:168、:177 |
中文名取自
lang/zh_CN.lang:595(枯萎甲虫),与英文Pinch Beetle(钳形甲虫) 语义有偏差 —— 中文本地化沿用即可,非源码级事实。
数值
| 属性 | 值 | 来源 |
|---|---|---|
maxHealth |
40.0 | EntityTFPinchBeetle.java:59 |
movementSpeed |
0.23 | EntityTFPinchBeetle.java:60 |
attackDamage 属性 |
4.0 | EntityTFPinchBeetle.java:61 |
近战伤害 getAttackStrength |
8(⚠️ 与上面的属性是两个独立值) | EntityTFPinchBeetle.java:159-161 |
| 护甲值 | super.getTotalArmorValue() + 2,上限 20 |
EntityTFPinchBeetle.java:67-76 |
骑乘偏移 getMountedYOffset |
0.75D | EntityTFPinchBeetle.java:227-230 |
| 骑乘者前伸距离 | 0.9F | EntityTFPinchBeetle.java:237-240 |
阴影尺寸 getShadowSize |
1.1F(仅客户端) | EntityTFPinchBeetle.java:163-167 |
| 冲锋速度参数 | 2.0F | EntityTFPinchBeetle.java:36 |
| 绑架移动速度参数 | 2.0F | EntityTFPinchBeetle.java:35 |
getLivingSound |
null(完全静音) |
EntityTFPinchBeetle.java:82-84 |
AI 行为 / 特殊机制
绑架机制(核心):见 entity/ai/EntityAITFKidnapRider.java。
优先级 1。shouldExecute 要求已经有骑乘者且 rand.nextInt(5) == 0(1/5 每 tick),
再在 5 格外找一个随机落点(:26-43),然后以 2.0F 速度奔向那里把猎物拖走。
attackEntityAsMob 会在自己无骑乘、目标无载具时直接
par1Entity.mountEntity(this)(EntityTFPinchBeetle.java:172-179)——
打谁就骑谁。
不让玩家下来:onLivingUpdate 检测到骑乘者在潜行就强行
setSneaking(false)(:119-124),源码注释直言「stop player sneaking so that
they can’t dismount!」。同时每 tick 调
func_145771_j(riderPos...) 把玩家从方块里推出来(:137-140)。
嘴在前面:updateRiderPosition() 把骑乘者放到正前方 0.9 格而不是背上
(:215-222),配合 getRiderPosition() 的三角函数计算(:235-249)。
被骑时 getLookHelper().setLookPositionWithEntity(riddenByEntity, 100F, 100F)
让它盯着嘴里的东西(:132-135)。
冲锋:EntityAITFChargeAttack(this, 2.0F)(优先级 2)——
与 Minotaur(牛头人) 同款。但 EntityTFPinchBeetle 没有实现
ITFCharger(对比 EntityTFMinotaur.java:26),所以 EntityAITFChargeAttack
里 ((ITFCharger) charger).setCharging(...) 的强转在冲锋时会失败
(EntityAITFChargeAttack.java 内部),也拿不到击飞加成。
难度门槛:getAttackStrength 恒 8(EntityTFPinchBeetle.java:159-161),
不随难度变化。
成就:onDeath 在暮色森林维度被玩家击杀时触发 twilightHunter(:147-154)。
无掉落覆写:本类没有 getDropItem / dropFewItems。
死代码:
EntityTFPinchBeetle.java:40被注释掉的// this.tasks.addTask(8, new EntityAILookIdle(this));—— 本类不会呆站。EntityTFPinchBeetle.java:121、:135两行注释掉的调试输出。EntityTFPinchBeetle.java:189-193整段注释掉的 「玩家右键骑上甲虫」分支 —— 意味着玩家无法主动骑乘,只能被骑。EntityTFPinchBeetle.java:31注释掉的// moveSpeed = 0.23F;。
相关条目
- Minotaur(牛头人) - 共用
EntityAITFChargeAttack,但实现了ITFCharger - Fire Beetle(喷火甲虫) - 同区域的另一种甲虫
- Dark Tower(黑暗高塔) - 三个刷怪点之一