🏛️ Arquitetura do sistema e estrutura de pacotes
📌 Aviso sobre o Código-Fonte do Repositório: A documentação desta Wiki reflete o estado atual do código-fonte no repositório, podendo incluir commits recentes ou recursos em desenvolvimento não lançados no CurseForge ou Modrinth.
| Design Principle | Architectural Policy |
|---|---|
| Core Philosophy | Vanilla Outsider (VO) — Diegetic, non-destructive, input-consistent |
| Design Rule | 1 File, 1 Function Law (Single-responsibility Cohesion) |
| Main Package Namespace | net.vanillaoutsider.betterbats |
| Thread Safety Model | Server-Thread Main Looper Sync (No async world mutation) |
☕ Nota do desenvolvedor: Se você gosta dos morcegos em revoadas 3D realistas e fertilizando plantações com guano, apoie meu trabalho solo no Ko-fi!
🌳 Árvore de pacotes
net.vanillaoutsider.betterbats
├── BetterBatsFabric.java # Mod initialization, GameRules registration
├── BetterBatsFabricClient.java # Client render layer, debug toggles
├── ai/ # AI Goal domain logic
│ ├── BatDiveBombGoal.java # Predatory hunting of silverfish/endermites
│ ├── BatFlightHelper.java # 3D BOIDs flocking and vector math
│ ├── BatHuntLightGoal.java # Nighttime phototaxis light orbiting
│ ├── BatPanicGoal.java # Vibration acoustic panic dispersion
│ ├── BatRoostHelper.java # Daytime roost surface validator
│ └── BatSleepGoal.java # Roosting and guano accumulation
├── config/ # YACL v3 and Cloth Config menus
│ ├── BetterBatsConfig.java # Plain Java config data model
│ └── ModMenuIntegration.java # ModMenu screen factory provider
└── mixin/ # Bytecode injection layer
├── BatMixin.java # Injects AI goals, flight forces, save data
├── GameEventDispatcherMixin.java # Acoustic vibration listener hook
└── NaturalSpawnerMixin.java # Dynamic ambient spawner weight replacement🧩 Responsabilidades de classes
BatFlightHelper: Stateless mathematical engine computing flocking, cohesion, separation, alignment, and altitude bounds.BatRoostHelper: Checks valid roosting blocks (dripstone, chains, lanterns, leaves, solid ceilings).BatMixin: Surgical bytecode hooks ensuring complete vanilla world-save safety.
