-
Notifications
You must be signed in to change notification settings - Fork 0
Behavior Profiles and Conditions
Rifaditya edited this page Aug 9, 2026
·
1 revision
Overview of the Goal Priority Matrix, BatStateAccessor interface, and flag management controlling bat state transitions.
All goals set move flags (this.setFlags(EnumSet.of(Goal.Flag.MOVE))) to prevent movement conflicts:
| Priority Level | Goal Class | Activation Condition | Behavior Summary |
|---|---|---|---|
| Priority 1 | BatPanicGoal |
Vibration / Explosion event received (panicTicks > 0) |
Disperses from group, flies rapidly in opposite vector of noise source for 5 seconds ( |
| Priority 2 | BatSleepGoal |
Daytime bright outside OR raining exposed to sky | Searches 16-block radius for dark roost surface (Sky=0, Block<=7), prioritizing resting bat clusters. |
| Priority 4 | BatHuntLightGoal |
Nighttime, Block Light > 8 detected within 10 blocks | Approaches with curved banking, orbits light center for 10–30s with vertical sine bobbing and CRIT particles. |
| Priority 5 | BatDiveBombGoal |
bat_pest_control == true, Silverfish/Endermite within 8 blocks |
Dives towards pest at |
BatStateAccessor provides lightweight duck-typing access to internal state flags on vanilla Bat entities without polluting vanilla entity classes:
public interface BatStateAccessor {
boolean betterbats$isGoalActive();
void betterbats$setGoalActive(boolean active);
void betterbats$resetGuanoTicks();
void betterbats$panic(Vec3 source);
boolean betterbats$isPanicked();
int betterbats$getPanicTicks();
void betterbats$setPanicTicks(int ticks);
Vec3 betterbats$getPanicSource();
}- When
betterbats$isGoalActive()returnstrue, ambientBatFlightHelperBOIDs flocking and organic wandering are temporarily suspended, allowing the active custom goal full control over the entity's delta movement.
Better Bats Wiki • Copyright © 2026 Dasik (Rifaditya) • Licensed under GNU GPLv3
📌 The documentation in this Wiki reflects the current source code state in the repository.
- Bat Ecology & Photophobia
- 3D BOIDs Flocking & Math
- Guano Crop Fertilization
- Phototaxis & Light Orbiting
- Pest Control Combat
- Echolocation & Panic
- Chiroptera Genetics
- Dynamic GameRules
- Ambient Spawning Rules
- HUD & Client GUI Config
- Commands & Advancements
- Sounds & Particle Effects
- Troubleshooting & FAQ