-
Notifications
You must be signed in to change notification settings - Fork 0
Genetics API and Pedigree
| Facade Class | net.dasik.social.api.genetics.DasikAnimalGeneticsAPI |
|---|---|
| Supported Attributes |
scale, max_health, movement_speed, attack_damage
|
| Kinship Check Depth | Up to 3 generations (Parents, Grandparents) |
| Inbreeding Risk Range |
0% (Unrelated) to 100% (Full Siblings / Self) |
DasikAnimalGeneticsAPI provides high-level static methods for consumer mods to query, update, reset, and evaluate entity genetics without directly manipulating NBT tags or raw attachment codecs.
public final class DasikAnimalGeneticsAPI {
// Size & Scale
public static float getScale(LivingEntity entity);
public static void setScale(LivingEntity entity, float scale);
public static boolean isRunt(LivingEntity entity);
public static boolean isGiant(LivingEntity entity);
// Kinship & Pedigree
public static boolean isRelated(LivingEntity entity1, LivingEntity entity2);
public static int predictInbreedingRiskPercent(LivingEntity parent1, LivingEntity parent2);
// Trait Modifiers
public static void setTrait(LivingEntity entity, String traitKey, float value);
public static void modifyTrait(LivingEntity entity, String traitKey, float delta);
public static void resetGenetics(LivingEntity entity);
}The pedigree analyzer recursively checks parent UUID matches across ancestors:
[ Parent 1 ] [ Parent 2 ]
โ โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโโค
โผ โผ โผ
[ Offspring1 ] [ Offspring2 ]
โ โ
โโโโ BREEDING โโโ
โ
โผ
Inbreeding Risk = 50% (Full Siblings)
// Check inbreeding risk before allowing breeding
int risk = DasikAnimalGeneticsAPI.predictInbreedingRiskPercent(dog1, dog2);
if (risk > 25) {
// Trigger inbreeding warning particles or prevent breeding
}
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