Skip to content

🌿 Autonomous Wild Breeding & Species Habitats

"A thriving ecosystem does not rely on hand-fed wheat."

In vanilla Minecraft, passive animals are inert entities that only breed when directly interacted with by a player. Natural Reproduction introduces an autonomous ecological simulation where animals in the wild graze, evaluate their surrounding biome and food flora, and reproduce when environmental conditions are optimal.


📋 System Infobox

PropertyValue
Namespacenatural-reproduction
Master Togglenatural-reproduction:enabled (Default: true)
Base Breeding Ratenatural-reproduction:rate (Default: 24000 ticks / 1 MC Day)
Density Check Radius16 blocks horizontal
Population Density Capnatural-reproduction:density_cap (Default: 10 entities)
Staggered Evaluation Cycle(entityId + gameTime) % 100 == 0
Supported Animal Species27 vanilla species (All passive livestock, wild beasts, amphibians)
Primary Helper ClassAnimalHabitatHelper.java, SpatialBreedingCacheHelper.java

🎮 Player & Survival Gameplay Workflow

  1. Environmental Flora Alignment: Animals will only enter Love Mode autonomously if suitable food or habitat blocks exist within a 4-block radius.
  2. Health & Age Check: Both potential parents must be fully grown adults (age == 0) and possess healthy vitality (health > maxHealth * 0.5).
  3. Density Cap Safety: If the number of same-species animals within 16 blocks reaches or exceeds density_cap (default: 10), wild breeding is suppressed to prevent runaway server lag.
  4. Autonomous Love State: When all checks pass, both parents enter Love Mode concurrently with heart particle feedback (HEART), seeking each other out to mate naturally.

🧮 Mathematical Formalization & Algorithmic Flow

1. Staggered Cycle Distribution

To eliminate tick spikes, autonomous checks do NOT run on every tick. Instead, evaluations are distributed across 100-tick time slices:

$$\text{isEvaluationTick} \iff (\text{entityId} + \text{level.getGameTime()}) \pmod{100} = 0$$

2. Autonomous Breeding Probability

On every evaluation tick ($5\text{ seconds}$), the probability $P_{\text{breed}}$ of an individual animal attempting reproduction is governed by:

$$P_{\text{breed}} = \frac{100}{\text{rate}} \times \text{biomeMultiplier} \times \text{nourishmentMultiplier}$$

  • Base rate $= 24,000\text{ ticks} \implies P_{\text{breed}} \approx 0.416%$ per 100 ticks.
  • Native Biome bonus $= 2.0\text{x} \implies P_{\text{breed}} \approx 0.833%$.
  • Well-Nourished bonus $= 1.25\text{x} \implies P_{\text{breed}} \approx 1.042%$.
[Server Tick Loop]


(id + time) % 100 == 0? ──No──► [Fast-Fail Return]
       │ Yes

Is Master Enabled & Species Allowed? ──No──► [Abort]
       │ Yes
Local Same-Species Density < density_cap (16 blocks)? ──No──► [Abort]
       │ Yes
Nearby Food/Habitat Blocks Present (4 blocks)? ──No──► [Abort]
       │ Yes
Roll Breeding Probability (P_breed)? ──Fail──► [Abort]
       │ Pass
Partner in Range? ──Yes──► [Both Enter Love Mode + Emit Hearts]

🐾 Species Habitat Block Trigger Matrix (27 Species)

SpeciesPrimary Habitat BlocksSpecial Environmental Triggers
Cow & MooshroomGRASS_BLOCK, SHORT_GRASS, TALL_GRASS, HAY_BLOCKMooshrooms also accept MYCELIUM
SheepGRASS_BLOCK, SHORT_GRASS, TALL_GRASS, HAY_BLOCKPrefers un-sheared wool state
PigMUD, FARMLAND, CARROTS, POTATOES, BEETROOTSMud blocks grant +10% love speed
ChickenWHEAT_SEEDS, HAY_BLOCK, SHORT_GRASS, FARMLANDRolls for Fertilized Eggs
Horse, Donkey, MuleGRASS_BLOCK, SHORT_GRASS, HAY_BLOCKRequires open sky clearance
Llama & Trader LlamaGRASS_BLOCK, HAY_BLOCK, SAND, GRAVELMountain biomes grant native boost
CamelSAND, RED_SAND, CACTUS, DEAD_BUSHDesert climate native
WolfPODZOL, SPRUCE_LEAVES, SNOW_BLOCK, COARSE_DIRTVariant-specific biome checks
Cat & OcelotGRASS_BLOCK, JUNGLE_LEAVES, MOSS_BLOCKVillage or Jungle proximity
FoxSWEET_BERRY_BUSH, PODZOL, SNOW_BLOCKTaiga / Snowy Taiga flora
RabbitCARROTS, DANDELION, SAND, SNOWDesert & Tundra adapted
FrogWATER, LILY_PAD, MUD, MANGROVE_ROOTS, DRIPLEAFTemperature controls variant offspring
TurtleSAND, WATER, SEAGRASSBeach biome nesting
AxolotlWATER, CLAY, DRIPLEAFLush Caves / dark water
GoatSTONE, SNOW_BLOCK, PACKED_ICE, POWDER_SNOWHigh altitude ($Y \ge 90$)
PandaBAMBOO, BAMBOO_SAPLINGBamboo Jungle native
Polar BearICE, PACKED_ICE, BLUE_ICE, SNOW_BLOCKFrozen Oceans & Snowy Plains
BeeBEE_NEST, BEEHIVE, FLOWERSRequires active pollination
ArmadilloSAND, RED_SAND, TERRACOTTA, DEAD_BUSHSavanna & Badlands flora
SnifferMOSS_BLOCK, TORCHFLOWER, PITCHER_PLANTAncient flora enrichment
StriderLAVA, WARPED_NYLIUM, CRIMSON_NYLIUMNether lava seas
HoglinCRIMSON_NYLIUM, CRIMSON_FUNGUSCrimson Forest native

💻 Developer & Addon Extension Hooks

Checking Environmental Conditions Programmatically

java
// Check if an entity has valid habitat conditions
boolean canBreed = AnimalHabitatHelper.hasEnvironmentalBreedingConditions(animal, level);

Spatial Cache Optimization

java
// SpatialBreedingCacheHelper caches chunk density counts for 100 ticks
int localCount = SpatialBreedingCacheHelper.getDensity(level, animal.blockPosition(), animal.getType());

Official documentation & web portal for Dasik Igaijinn mods.