Skip to content

🤖 行为配置、目标优先级与状态访问器 ​

📌 代码仓库源码免责声明:本维基文档反映了仓库当前的源代码状态,可能包含领先于 CurseForge 与 Modrinth 上公开发布版本的最新开发提交或未发布功能。

📊 AI 目标优先级矩阵 ​

All custom goals set move flags (this.setFlags(EnumSet.of(Goal.Flag.MOVE))) to prevent conflicting movement vector calculations:

Priority LevelGoal ClassActivation ConditionBehavior Summary
Priority 1BatPanicGoalAcoustic vibration detected (distSq < 256.0)Instant flock dispersion, rapid fleeing away from disturbance
Priority 2BatSleepGoalDaytime (world.isDay()) or darkness retreatSeeks dark ceilings, stalactites, lanterns; hangs inverted
Priority 3BatHuntLightGoalNighttime & artificial light within 10 blocksApproaches lantern/torch, transitions into circular banking orbit
Priority 4BatDiveBombGoalSilverfish / Endermite within 8 blocksAscends, locks target, delivers high-speed dive-bomb impact
Priority 5BatFlightHelper / FlockingAirborne, no high-priority interruptsContinuous 3D BOIDs cohesion, alignment, separation flight

☕ 独立开发者寄语:如果你喜欢蝙蝠逼真的三维群飞和鸟粪为庄稼施肥的生态体验,欢迎在 Ko-fi 上支持我的独立开发!


🔌 状态访问器接口协议 ​

BatStateAccessor allows external mods or internal mixins to inspect live bat state without reflection:

java
public interface BatStateAccessor {
    boolean betterbats$isPanicking();
    boolean betterbats$isHuntingLight();
    BlockPos betterbats$getTargetLightPos();
}

See also: 系统架构与包结构 | 第三方模组集成指南

Official documentation & web portal for Dasik Igaijinn mods.