-
Notifications
You must be signed in to change notification settings - Fork 0
Animal Genetics Engine
| Property | Value |
|---|---|
| Core Package | net.dasik.social.api.genetics |
| Attachment Identifier | dasik-library:genetics |
| Scale Bounds |
0.1x to 3.0x (Default: 0.5x - 2.0x) |
| Runt Threshold | Scale |
| Giant Threshold | Scale |
| Data Codec | EntityGenetics.CODEC |
The Animal Genetics Engine provides an entity-agnostic persistent genetics system backed by Fabric's AttachmentType. Every genetic entity stores an EntityGenetics record:
-
parent1Uuid(Optional<UUID>): Primary parent UUID if born via breeding. -
parent2Uuid(Optional<UUID>): Secondary parent UUID if born via breeding. -
inbred(boolean): Flag indicating whether parents shared lineage. -
traitsRolled(boolean): Flag indicating initial random stat rolling completed. -
traits(Map<String, Float>): Dynamic trait values (scale,max_health,attack_damage,movement_speed).
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EntityGenetics โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ parent1Uuid: Optional<UUID> โ inbred: boolean โ
โ parent2Uuid: Optional<UUID> โ traitsRolled: boolean โ
โ traits: Map<String, Float> โ Codec: EntityGenetics.CODEC โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
When two entities breed, offspring genetics are calculated via GeneticsEngine.calculateOffspringGenetics:
The offspring's baseline scale
Where
If parents share lineage (
// Accessing genetics on an entity
EntityGenetics genetics = EntityGeneticsRegistry.getGenetics(livingEntity);
float scale = genetics.getScale();
boolean isRunt = scale < 0.75f;
// Applying genetics modifier
GeneticsEngine.applyGeneticsModifiers(livingEntity);
Dasik Library | Social AI & Infrastructure Engine
Developed with โค๏ธ by Dasik (Rifaditya) | Licensed under LGPL-3.0
๐ Documentation reflects active repository source code state.
- Hive Mind Social System
- Social Scheduler & Events
- Animal Genetics Engine
- Genetics API & Pedigree
- Genetics Loot Modifiers
- Leader Follower & Flocking
- Dynamic GameRules Manager
- GameRule Codec & Serialization
- Client GameRule & GUI Helpers
- Dynamic Enchantments & Vision
- Stochastic & Math Utilities
- Stale Attribute Purging & Scale
- ModVersionGuard & Startup Safety
- Developer Setup & Building
- Architecture & Package Layout
- Mixin Reference & Hooks
- Behavior Profiles & Conditions
- Consumer Mods Integration Guide