Ice n Fire Breeding

Quick rating

Ice n Fire Breeding

No reviews yet

Dragon Breeding Enhanced adds genetic breeding to Ice and Fire dragons. Breed dragons with 15 custom colors, inherit traits, and see genetic diversity with male/female textures. Includes /instahatch command for testing. BETA - results may vary.

Genetics & Biology
Mod Loaders
Forge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
dragon-breeding-enhanced-1.3.0.jar
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

# Dragon Breeding Enhanced - Technical Summary

## Overview
Dragon Breeding Enhanced is a comprehensive genetics and breeding system for Ice and Fire dragons in Minecraft 1.20.1.

## Core Systems

### 1. Genetics System (`DragonGenetics.java`)
- **Data Structure**: Stores traits, color, generation, parents, and custom stats
- **Serialization**: Full NBT support for persistence
- **Stat Calculations**: Dynamic modifiers based on genetic makeup

### 2. Trait System (`DragonTrait.java`)
**25 Traits across 5 categories:**

**Physical** (5 traits)
- Large/Small Size, Thick Scales, Sharp Claws, Reinforced Wings
- Inheritance chance: 10-15%

**Elemental** (5 traits)
- Fire/Ice Mastery, Lightning Affinity, Frost/Inferno Aura
- Inheritance chance: 6-8%

**Combat** (5 traits)
- Aggressive, Defensive, Swift Striker, Berserker, Tank
- Inheritance chance: 8-12%

**Magical** (4 traits)
- Mana Blessed, Spell Resistance, Arcane Power, Regeneration
- Inheritance chance: 5-10%

**Legendary** (5 traits)
- Ancient Blood, Divine Scales, Shadow Walker, Storm Born, Void Touched
- Inheritance chance: 1-2%

### 3. Color Genetics (`DragonColor.java`)
**15 Color Variants with rarity tiers:**

| Rarity | Colors | Spawn Chance | Stat Multiplier |
|--------|--------|--------------|-----------------|
| Common | Standard | 40% | 1.0x |
| Uncommon | Sapphire, Emerald, Ruby | 15% each | 1.1x |
| Rare | Amethyst, Obsidian, Silver, Gold | 8% each | 1.25x |
| Epic | Opal, Prismatic, Starlight | 3-4% each | 1.5x |
| Legendary | Void, Celestial, Aurora, Phantom, Cosmic | 0.5-1% each | 2.0x |

### 4. Breeding Mechanics (`DragonGeneticsManager.java`)

#### Trait Inheritance Algorithm
```
For each parent trait:
- Both parents have trait: 3x base inheritance chance (max 95%)
- One parent has trait: 1.5x base inheritance chance
- Apply config multiplier
- Random roll determines inheritance
```

#### Color Inheritance
```
If parents same color: 85% chance to inherit
Otherwise: 50/50 from either parent
5% chance for random mutation to new color
```

#### Mutation System
- Configurable mutation chance (default 5%)
- Adds completely random trait during breeding
- Independent of parent genetics

#### Generation System
- Generation = max(parent1.gen, parent2.gen) + 1
- Each generation provides configurable stat bonus (default 2% per gen)
- Capped at configurable maximum (default 10 generations)

### 5. Configuration System (`BreedingConfig.java`)

**40+ Configuration Options:**

**Breeding**
- Trait inheritance multiplier (0.1-10.0, default: 1.0)
- Mutation chance (0-100%, default: 5%)
- Max traits per dragon (1-20, default: 5)
- Breeding cooldown (0-72000 ticks, default: 12000)

**Color Genetics**
- Enable rare colors toggle
- Rare color chance multiplier
- Legendary colors toggle

**Traits**
- Enable legendary traits toggle
- Legendary trait chance multiplier
- Allow conflicting traits toggle

**Stats**
- Global multipliers for health/damage/armor/speed
- Generation bonus enable/disable
- Generation bonus amount per generation
- Max generation for bonuses

**QoL**
- Show genetics in nameplate
- Show detailed tooltips
- Auto-apply stat modifiers

### 6. Event System (`DragonBreedingEventHandler.java`)

**Events Handled:**
1. `BabyEntitySpawnEvent`: Triggers genetic breeding calculation
2. `LivingTickEvent`: Applies genetic stat modifiers (every 100 ticks)

**Stat Application:**
- Modifies entity attributes directly
- Applies health, damage, armor, speed modifiers
- Accounts for generation bonuses
- Respects global config multipliers

## Data Flow

### Breeding Process
```
1. BabyEntitySpawnEvent triggered
2. Get genetics for both parents from cache/NBT
3. Calculate offspring genetics:
   a. Inherit color (with mutation chance)
   b. Inherit traits from parents
   c. Roll for mutation
   d. Calculate generation
   e. Set parent IDs
4. Save genetics to offspring NBT
5. Cache genetics in memory
6. Apply stat modifiers if auto-apply enabled
```

### Genetics Retrieval
```
1. Check in-memory cache
2. If not cached, load from entity NBT
3. If no NBT data, generate random genetics
4. Cache and return genetics
```

## Performance Considerations

### Optimizations
- **In-memory cache**: Reduces NBT reads
- **Periodic updates**: Stats updated every 5 seconds, not every tick
- **Lazy loading**: Genetics only generated when needed
- **Efficient storage**: Compact NBT serialization

### Memory Usage
- Cache stores UUID -> DragonGenetics mapping
- Cleared when dragons are removed
- Minimal overhead per dragon (~1-2 KB)

## Integration Points

### Ice and Fire Compatibility
- Detection via class name checking (`iceandfire` + `dragon`)
- Works with entity events (breeding, spawning)
- No direct API dependencies (loose coupling)
- Compatible with Ice and Fire 2.1.13+

### Forge Integration
- Uses standard Forge event system
- Leverages Minecraft attribute system
- ForgeConfigSpec for configuration
- NBT for data persistence

## Future Expansion Possibilities

### Potential Features
1. **GUI System**: Visual genetics viewer/selector
2. **Breeding Station**: Custom block for controlled breeding
3. **Genetics Book**: In-game documentation item
4. **DNA Items**: Extract and store genetics
5. **Trading**: Share genetics between players
6. **Genetics Lab**: Research facility for trait manipulation
7. **Advanced Stats**: More detailed stat tracking
8. **Breeding Logs**: History of all breedings
9. **Genetics Commands**: Admin tools for genetics manipulation
10. **Client Sync**: Network packets for client-side display

### API Possibilities
- Public API for other mods to interact with genetics
- Events for genetics changes
- Hooks for custom traits
- Custom color registration

## Code Quality

### Design Patterns
- **Manager Pattern**: DragonGeneticsManager centralizes logic
- **Enum Pattern**: Traits and colors are type-safe enums
- **Data Class**: DragonGenetics is pure data structure
- **Event-Driven**: Loose coupling via Forge events

### Best Practices
- Comprehensive error handling
- Logging at appropriate levels
- Configuration validation
- NBT versioning support
- Clean separation of concerns

## Testing Recommendations

### Unit Tests
- Trait inheritance calculations
- Color genetics algorithm
- Stat modifier calculations
- NBT serialization/deserialization

### Integration Tests
- Breeding with various parent combinations
- Config changes affecting behavior
- Multiple generations of breeding
- Edge cases (no traits, all traits, etc.)

### Performance Tests
- Large numbers of dragons
- Cache performance
- NBT load/save performance

## Known Limitations

1. **Loose Integration**: Uses class name detection rather than direct API
2. **No Client Sync**: Genetics data server-side only currently
3. **No Visual Indicators**: Requires external tools to view genetics
4. **Placeholder Network**: NetworkHandler not fully implemented
5. **No GUI**: Configuration file editing only

## Deployment

### Build Process
```bash
gradlew.bat build
```
Output: `build/libs/dragon-breeding-enhanced-1.0.0.jar`

### Installation
1. Requires Forge 47.2.0+
2. Requires Ice and Fire mod
3. Place JAR in mods folder
4. Config auto-generates in config folder

### Configuration
- Server config: `config/dragonbreeding-server.toml`
- Auto-generated on first run
- Hot-reloadable (most settings)

## Version Information

- **Minecraft Version**: 1.20.1
- **Forge Version**: 47.2.0+
- **Java Version**: 17
- **Mod Version**: 1.0.0
- **Ice and Fire**: 2.1.13+

## File Structure
```
dragon-breeding-enhanced/
├── src/main/
│   ├── java/com/dragonbreeding/
│   │   ├── DragonBreedingMod.java (257 lines)
│   │   ├── config/
│   │   │   └── BreedingConfig.java (151 lines)
│   │   ├── genetics/
│   │   │   ├── DragonTrait.java (82 lines)
│   │   │   ├── DragonColor.java (79 lines)
│   │   │   ├── DragonGenetics.java (231 lines)
│   │   │   └── DragonGeneticsManager.java (280 lines)
│   │   ├── event/
│   │   │   └── DragonBreedingEventHandler.java (152 lines)
│   │   └── network/
│   │       └── NetworkHandler.java (22 lines)
│   └── resources/META-INF/
│       └── mods.toml
├── build.gradle
├── settings.gradle
├── gradle.properties
├── README.md
└── MOD_SUMMARY.md
```

**Total Lines of Code**: ~1,254 lines of Java
**Total Classes**: 8 classes
**Total Enums**: 2 enums

## Summary

Dragon Breeding Enhanced provides a robust, configurable, and extensible genetics system for Ice and Fire dragons. The architecture is clean, maintainable, and ready for future enhancements while providing immediate value through comprehensive breeding mechanics, trait inheritance, and color genetics.

Screenshots

Gallery

  • 2025-10-27_17.19.30.png
    2025-10-27_17.19.30.png 2025-10-27_17.19.30.png
  • 2025-10-27_17.18.34.png
    2025-10-27_17.18.34.png 2025-10-27_17.18.34.png
  • 2025-10-27_17.18.13.png
    2025-10-27_17.18.13.png 2025-10-27_17.18.13.png
  • 2025-10-27_17.17.15.png
    2025-10-27_17.17.15.png 2025-10-27_17.17.15.png
  • 2025-10-27_17.16.42.png
    2025-10-27_17.16.42.png 2025-10-27_17.16.42.png
  • 2025-10-27_17.16.01.png
    2025-10-27_17.16.01.png 2025-10-27_17.16.01.png
  • 2025-10-27_17.12.25.png
    2025-10-27_17.12.25.png 2025-10-27_17.12.25.png
  • 2025-10-27_17.09.48.png
    2025-10-27_17.09.48.png 2025-10-27_17.09.48.png
  • 2025-10-27_17.09.17.png
    2025-10-27_17.09.17.png 2025-10-27_17.09.17.png
  • 2025-10-27_17.08.52.png
    2025-10-27_17.08.52.png 2025-10-27_17.08.52.png
  • 2025-10-27_17.08.13.png
    2025-10-27_17.08.13.png 2025-10-27_17.08.13.png
  • 2025-10-27_17.07.45.png
    2025-10-27_17.07.45.png 2025-10-27_17.07.45.png
  • 2025-10-27_17.06.55.png
    2025-10-27_17.06.55.png 2025-10-27_17.06.55.png
  • 2025-10-27_17.06.10.png
    2025-10-27_17.06.10.png 2025-10-27_17.06.10.png
  • 2025-10-27_17.01.10.png
    2025-10-27_17.01.10.png 2025-10-27_17.01.10.png

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~8,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works