-
Notifications
You must be signed in to change notification settings - Fork 0
Pest Control and Predatory Combat
Rifaditya edited this page Aug 9, 2026
·
1 revision
| Parameter | Specification Details |
|---|---|
| AI Goal Class | net.vanillaoutsider.betterbats.ai.BatDiveBombGoal |
| GameRule Toggle |
better-bats:bat_pest_control (Default: true) |
| Target Pest Entities |
Silverfish (EntityTypes.SILVERFISH), Endermite (EntityTypes.ENDERMITE) |
| Detection Radius |
8 blocks (Bounding box inflation) |
| Base Impact Damage |
10.0 points ( |
| Genetics Damage Multiplier |
attack_damage trait ( |
| Dive-Bomb Speed | 0.3 blocks/tick |
| Audio Cue |
minecraft:entity.bat.ambient (Pitch 0.5f) |
When enabled via the better-bats:bat_pest_control GameRule, bats act as ecological pest control agents, scanning their surroundings for crawling arthropod pests (Silverfish and Endermites).
┌───────────────────────────────┐
│ Bat in Flight (Active) │
└───────────────┬───────────────┘
│
GameRule bat_pest_control == true?
│
Scans 8 blocks for Silverfish/Endermite
│
Pest Entity Found?
┌────────┴────────┐
YES NO
│ │
Clear Group Leader Continue Ambient
Set Goal Active = true Flight / Flocking
│
Accelerate 0.3 b/t
Direct Dive-Bomb
│
Distance < 1.0?
│
💥 Deal (10.0 * attack_damage_trait)
🎵 Play BAT_AMBIENT sound (Pitch 0.5)
The damage dealt to a pest upon impact is scaled dynamically by the bat's individual genetics:
-
Base Trait Value: Default baseline is
$2.0$ . -
Genetic Trait Range:
$1.0\times$ to$4.0\times$ (configured inEntityGeneticsRegistry). -
Effective Damage Range:
$10.0$ to$40.0$ damage points (instantly slaying standard Silverfish with$8\text{ HP}$ or Endermites with$8\text{ HP}$ ).
if (dist < 1.0) {
float attackDamageTrait = DasikAnimalGeneticsAPI.getTrait(this.bat, "attack_damage", 2.0f);
float damage = 10.0f * attackDamageTrait;
this.targetPest.hurt(this.bat.damageSources().mobAttack(this.bat), damage);
this.bat.playSound(SoundEvents.BAT_AMBIENT, 1.0f, 0.5f);
this.targetPest = null;
}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