🤖 Verhaltensprofile, Zielflaggen & Status-Zugriffsmethoden
📌 Quellcode-Hinweis: Die Dokumentation in diesem Wiki gibt den aktuellen Stand des Quellcodes im Repository wieder, einschließlich unfertiger Commits und Entwicklungsfunktionen vor der offiziellen Veröffentlichung auf CurseForge und Modrinth.
📊 AI-Goal Prioritäten-Matrix
All custom goals set move flags (this.setFlags(EnumSet.of(Goal.Flag.MOVE))) to prevent conflicting movement vector calculations:
| Priority Level | Goal Class | Activation Condition | Behavior Summary |
|---|---|---|---|
| Priority 1 | BatPanicGoal | Acoustic vibration detected (distSq < 256.0) | Instant flock dispersion, rapid fleeing away from disturbance |
| Priority 2 | BatSleepGoal | Daytime (world.isDay()) or darkness retreat | Seeks dark ceilings, stalactites, lanterns; hangs inverted |
| Priority 3 | BatHuntLightGoal | Nighttime & artificial light within 10 blocks | Approaches lantern/torch, transitions into circular banking orbit |
| Priority 4 | BatDiveBombGoal | Silverfish / Endermite within 8 blocks | Ascends, locks target, delivers high-speed dive-bomb impact |
| Priority 5 | BatFlightHelper / Flocking | Airborne, no high-priority interrupts | Continuous 3D BOIDs cohesion, alignment, separation flight |
☕ Solo-Entwickler-Notiz: Wenn dir die realistischen 3D-Fledermausschwärme und die Guano-Düngung deiner Felder gefallen, unterstütze mich gerne auf Ko-fi!
🔌 BatStateAccessor Schnittstelle
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: Architektur & Paketstruktur | Addon-Integrationsleitfaden
