Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Tags
Creators
Details
ðĶ Better Bats
Active Version Policy: I build 1 JAR for 1 Version. I only update and maintain the latest active Minecraft version (e.g. when 26.3 is released, 26.2 is retired). No backports or legacy version maintenance. Please do not ask.
The Vanilla Problem: In vanilla Minecraft, bats are purely cosmetic, chaotic, ambient entities that offer no interactive value to the player's world. They fly aimlessly, spawn in complete darkness, and drop absolutely nothing, rendering them essentially useless.
Better Bats changes this foundation. It integrates bats into the ecosystem as active, social, and symbiotic neighbors. They group into coordinated swarms, seek shelter from the sun, fertilize crops with guano, hunt insect pests, circle lanterns like moths, flee from natural predators, roost beneath stalactites and chains, and panic dynamically when loud events disrupt their sleep.
ðĨ Features
ð Hive Mind (Social Swarms / Murmuration)
Bats no longer fly in erratic, individual patterns. They organize into coordinated, leaderless swarms (murmurations) using a true Boids flocking algorithm. Each bat behaves independently â adjusting its flight to stick close to, align with, and avoid colliding with its immediate neighbors. No leader, no hierarchy, just emergent organic behavior.
[!NOTE] Boids Steering: Swarm flight is powered by a true leaderless Boids murmuration algorithm.
Flocking Range: 12 blocks â Cohesion, alignment, and separation steer bats naturally.
ðĐ Guano Fertility (Natural Growth)
While roosting upside down in the dark, bats slowly accumulate guano. Once the accumulation threshold is met (~10 minutes by default), they drop guano to fertilize soil and crops far below. You'll see vanilla bone meal particles and a burst of green Happy Villager particles when a crop is fertilized, plus drifting Mycelium particles falling from the roost to show guano dropping.
[!TIP] Farmland Enrichment: If a bat roosts above crops, it scans up to 20 blocks down to apply a bone meal growth tick â with full visual and audio feedback.
ðĶī Physical Guano Harvest
Want to build a guano collector tower? Enable the bat_drop_guano_item GameRule and roosting bats will drop physical Bone Meal item entities when resting over non-farmland blocks or when crops below are fully grown. Collect guano as a renewable resource!
[!TIP] GameRule:
bat_drop_guano_item(Default:false). Enable it to turn bats into a passive bone meal farm.
ðŠ Phototaxis (The Moth Effect)
During the night, bats are attracted to bright artificial light sources like moths. They break from their swarms and fly towards lanterns using a curved banking approach, then circle the light source with a vertical sine-wave bobbing pattern. After 10-30 seconds, they drop interest, go on cooldown, and eventually discover a new lantern â no more getting permanently stuck to one light.
[!NOTE] Insect Feeding: Bats circle light sources with brightness >8, emitting
critparticles to represent feeding on attracted insects.
ðĶ Pest Control (Symbiotic Defense)
Bats are natural allies in pest management. They will aggressively dive-bomb and one-shot crawling pests that enter their vicinity.
[!TIP] Predatory Prey: Bats target Silverfish and Endermites in a 10-block radius and instantly defeat them.
ðą Acoustic Panic
Caves are quiet for a reason. Loud noises (sprinting players, block mining, explosions) nearby will wake sleeping bat swarms instantly, sending them into a frantic, high-speed scatter â resetting their guano timers and dispersing the flock.
[!WARNING] Sleep Interruption: Noise events within 16 blocks trigger immediate panic flight and clear the bat's flocking state.
ðą Predator Avoidance
Bats are aware of their natural predators. They constantly scan for Cats, Ocelots, and Phantoms within a 10-block radius. Roosting bats wake up immediately and panic when predators approach, while flying bats receive a strong directional flee steering vector pushing them away from danger.
[!WARNING] Natural Predators: Cats, Ocelots, and Phantoms within 10 blocks trigger an immediate flee response. Keep a cat nearby to deter bats from an area!
ð Expanded Roosting
Bats can now roost upside down beneath far more than just solid ceilings. Supported roost surfaces include:
- Pointed Dripstone (stalactites hanging down)
- Hanging Lanterns
- Iron Chains
- Fences and Walls
- Tree Leaves
- Any block with a sturdy bottom face (slabs, stairs, etc.)
ð Twilight Funneling
At dusk (12000-14000 ticks) and dawn (22000-24000 ticks), the Boids parameters shift dramatically: alignment and cohesion increase 2.5Ã while separation drops 60%. This causes bats to stream together in tight formation when entering or leaving caves â creating a dramatic visual swarming effect at twilight.
âïļ Smooth Flight Engine
The flight system has been completely re-engineered for organic, natural movement:
- Smooth 3-Axis Rotation: Turns use
Mth.approachDegreeslerping (max 12° per tick) instead of instant 90° snapping - Hard Altitude Cap: Bats can never fly more than 30 blocks above the terrain surface
- Nighttime Comfort Zone: At night, bats stay within a 5-20 block band above terrain
- Minimum Flight Speed: Active flying bats maintain at least 0.15 blocks/tick â no mid-air hovering
- Ground/Water/Ceiling Avoidance: Continuous scanning prevents crashes, drowning, and ceiling collisions
- Two-Phase Daytime Return: High-altitude bats first descend to near-surface, then probe for dark cave spots
ðŪ Multiplayer
Better Bats is fully compatible with multiplayer environments. The flocking, guano, predator, and roosting algorithms run entirely server-side, ensuring vanilla clients can connect without issues.
ð Behavior Scenarios
Here is how bats naturally react in various environmental and player-driven scenarios:
- Daytime in Caves: Bats steer towards dark areas (lowest sky light) to find deep cave pockets. If they find a suitable ceiling (or stalactite, chain, lantern, etc.), they will roost and start producing guano.
- Daylight Avoidance: If bats get near a cave exit during the day, the sky light steering force will guide them back into the dark interior.
- Nighttime Exploration: At night, their preference reverses, steering them towards the highest sky light. Roosting bats will wake up and fly out of cave mouths to swarm under the open night sky.
- Twilight Streaming: At dusk and dawn, bats stream together in tight formation â alignment and cohesion surge while separation drops, creating dramatic cave-exit and cave-entry swarms.
- Murmuration Merging: When solitary bats fly near each other, they seamlessly merge into a cohesive murmuring flock due to cohesion and alignment forces.
- Expanded Roosting: Bats hang from stalactites, chains, hanging lanterns, fences, walls, leaves, and any block with a sturdy bottom face â not just solid ceilings.
- Guano Collection: With
bat_drop_guano_itemenabled, roosting bats drop physical Bone Meal items that can be collected via hoppers or other automation. - Water & Ground Avoidance: Bats constantly scan below and apply an upward steering force to avoid falling, crashing, or drowning in water.
- Acoustic Panic: Loud noises (mining, player sprinting, explosions) wake resting bats, forcing them to scatter in panic before eventually regrouping.
- Predator Evasion: Cats, ocelots, and phantoms within 10 blocks trigger an immediate flee response. Place a cat near your crops to keep bats away!
- Predation (Silverfish/Endermites): Bats will swoop down from their flock to eliminate nearby Silverfish and Endermites, then rejoin the murmuration.
- Artificial Light Attraction: At night, bats are drawn to lanterns (brightness >8) to hunt bugs, circling with curved banking and vertical bobbing before eventually losing interest and finding a new light source.
âïļ Config
[!IMPORTANT] Config vs. In-Game GameRules: The global configuration file only defines default values for new worlds at creation time. If you have already created/opened a world, changing the config file will have no effect. You must change the settings in-game using the Edit Game Rules UI screen or the
/gamerulecommand.
The mod works out of the box with zero setup.
- Global Template:
config/better-bats.json(Sets defaults for new worlds) - In-Game: Use
/gamerule [rule_name]for core settings:bat_swarm_size: Max bats allowed in a single flock. (Default: 5)bat_guano_threshold: Ticks required for a roosting bat to drop guano. (Default: 12000)bat_pest_control: Enables/disables hunting of silverfish and endermites. (Default: true)bat_drop_guano_item: If true, roosting bats drop physical Bone Meal items. (Default: false)bat_alignment: Strength of matching velocity direction with the swarm (0-100). (Default: 5)bat_cohesion: Strength of pull towards the swarm's center of mass (0-100). (Default: 5)bat_separation: Strength of collision avoidance from neighboring bats (0-100). (Default: 10)bat_spawn_weight: Spawn weight of bats relative to vanilla (0-100). (Default: 30)
[!IMPORTANT] Recommended Mod: Since this mod generates 8 GameRules, it is highly recommended to use Collapsible Game Rules for a cleaner UI.
ð§Đ Suggested Mods
For the best experience, we recommend installing:
- Collapsible Game Rules: Prevents the GameRules menu from becoming cluttered.
ðĶ Installation & Environment
âïļ Environment Support
- [ ] Client-side only: All functionality is done client-side and is compatible with vanilla servers.
- [x] Server-side only: All functionality is done server-side and is compatible with vanilla clients.
- [x] Works in singleplayer too
- [ ] Dedicated server only
- [ ] Client and server: Has some functionality on both the client and server.
ðĨ Install Instructions
- Install Fabric API.
- Install DasikLibrary.
- Download the latest Better Bats JAR for your Minecraft version and place it in your
modsfolder.
ð Compatibility
| Feature | Fabric (26.2+) |
|---|---|
| Singleplayer | â |
| Multiplayer (LAN/Server) | â |
| VO: Better Dogs | â |
| Empty Dimensions | â |
âĪ Support
If you enjoy Better Bats and the Vanilla Outsider philosophy, consider fueling the next update with a coffee!
[!NOTE] Indonesian Users: SocioBuzz and Saweria support local payment methods (Gopay, OVO, Dana, etc.) if you want to support me without using PayPal/Ko-fi!
ðĪ Credits
| Role | Author |
|---|---|
| Creator | Dasik (Rifaditya) |
| Collection | Vanilla Outsider |
| License | GNU GPLv3 |
[!IMPORTANT] This mod is part of the Vanilla Outsider collection. You are free to use it in modpacks, videos, and servers.
[!IMPORTANT] Modpack Permissions: You are free to include this mod in modpacks, provided the modpack is hosted on the same platform (e.g. Modrinth).
Cross-platform distribution is not permitted. If you download this mod from Modrinth, your modpack must also be published on Modrinth.
Made with âĪïļ for the Minecraft community
Part of the Vanilla Outsider Collection


