Skip to content

🛑 Cramped Pen Stunting & Spacious Pasture Recovery

NOTE

📌 代碼倉庫源碼狀態免責聲明:本 Wiki 文件反映了代碼倉庫中的當前源碼狀態v1.3.4+26.2)。可能包含領先於 CurseForge 與 Modrinth 公開發布版本的最新未發布提交或開發特性。


📋 System Infobox

PropertyValue
Feature NameConfinement Stunting & Pasture Recovery
Master Togglenatural-reproduction:cramped_space_penalty (Default: true)
Minimum Stunted Scale0.25x physical scale (Runts)
Maximum Pasture ScaleUp to 1.30x physical scale (Heavyweights)
Crowding Penalty Step-5% scale per extra entity beyond local threshold
Spacious Recovery Boost+10% to +30% genetic size recovery per generation
Particle FeedbackANGRY_VILLAGER & SMOKE (Stunted) / HAPPY_VILLAGER (Recovered)
Primary HelperAnimalCrampedSpaceHelper.java

🎮 Player & Survival Gameplay Workflow

  1. Factory Farm Penalty:
    • If animals breed inside a 1x1 or 2x2 pit hole, or inside a fence pen with too many crowding entities ($N_{\text{local}} \ge 4$), the newborn is declared a Confined Runt.
    • The baby spawns with angry villager particles and receives a severe scale reduction (down to 0.25x).
  2. Reduced Harvest Yields:
    • Stunted animals drop drastically fewer resources upon maturity ($0.25\text{x}$ meat and leather).
  3. Pasture Rehabilitation:
    • Transfer stunted animals into an open, spacious pasture ($\ge 8\times 8$ grass blocks with $<3$ crowding neighbors).
    • When stunted parents breed in open pastures, their offspring receive Spacious Pasture Recovery (+30% size boost), gradually rehabilitating the lineage across generations back to normal (1.00x) and heavyweight (1.30x) sizes!

🧮 Mathematical Formulas & Degradation Curves

1. Confinement Penalty Curve

When an entity breeds in a confined or crowded area:

$$N_{\text{extra}} = \max(0, N_{\text{local}} - N_{\text{threshold}})$$

$$\text{PenaltyMultiplier} = \max\Big(0.95 - (N_{\text{extra}} \times 0.05),, 0.25\Big)$$

$$\text{Scale}_{\text{newborn}} = \text{ParentScale} \times \text{PenaltyMultiplier}$$

  • 1 extra crowding mob $\implies -5%$ scale penalty ($0.95\text{x}$).
  • 5 extra crowding mobs $\implies -25%$ scale penalty ($0.75\text{x}$).
  • Extreme 1x1 pit farming $\implies$ Hard floor clamp at $0.25\text{x}$ scale.

2. Spacious Pasture Recovery Formula

When breeding in an open pasture ($N_{\text{extra}} = 0$ and open sky clearance):

$$\text{RecoveryMultiplier} = 1.0 + \min(0.30,, 0.10 \times \text{PastureEnrichmentScore})$$

$$\text{Scale}_{\text{newborn}} = \min\Big(\text{ParentScale} \times \text{RecoveryMultiplier},, 1.30\Big)$$

     [Breeding Condition Evaluation]

      ┌─────────────┴─────────────┐
      ▼ Confined / Crowded        ▼ Open Spacious Pasture
 [Cramped Penalty: -5%/entity]  [Pasture Recovery: +10% to +30%]
      │                           │
      ▼                           ▼
 [Runt Scale: 0.25x - 0.75x]    [Full Potential: 1.00x - 1.30x]

💻 Developer & Helper API

Calculating Scale Modifiers

java
// Computes newborn scale based on parents and local confinement
float finalScale = AnimalCrampedSpaceHelper.calculateOffspringScale(
    mother, father, level, mother.blockPosition()
);

支持模組開發:如果您喜歡本模組,歡迎前往 Ko-fi 支持作者獲取最新開發測試組建!


Official documentation & web portal for Dasik Igaijinn mods.