public interface IAlleleRegistry
ISpeciesRoot, IAlleles, IFruitFamilys, IClassification, the blacklist and allows creation of research notes.| Modifier and Type | Method and Description |
|---|---|
void |
addValidAlleleTypes(IAllele allele,
IChromosomeType... chromosomeTypes)
Add more valid chromosome types for an allele.
|
void |
blacklistAllele(java.lang.String uid)
Blacklist an allele identified by its UID from mutation.
|
IClassification |
createAndRegisterClassification(IClassification.EnumClassLevel level,
java.lang.String uid,
java.lang.String scientific)
Creates and returns a classification.
|
IClassification |
createAndRegisterClassification(IClassification.EnumClassLevel level,
java.lang.String uid,
java.lang.String scientific,
IClassification... members) |
IAllele |
getAllele(java.lang.String uid)
Gets an allele
|
java.util.Collection<java.lang.String> |
getAlleleBlacklist() |
java.util.Collection<IChromosomeType> |
getChromosomeTypes(IAllele allele) |
IClassification |
getClassification(java.lang.String uid)
Gets a classification.
|
java.util.Map<java.lang.String,IAllele> |
getDeprecatedAlleleReplacements() |
IFruitFamily |
getFruitFamily(java.lang.String uid)
Retrieves a fruit family identified by uid.
|
IIndividual |
getIndividual(net.minecraft.item.ItemStack stack)
Retrieve genetic information from an itemstack.
|
net.minecraft.item.ItemStack |
getMutationNoteStack(com.mojang.authlib.GameProfile researcher,
IMutation mutation) |
java.util.Map<java.lang.String,IAllele> |
getRegisteredAlleles() |
java.util.Collection<IAllele> |
getRegisteredAlleles(IChromosomeType type) |
java.util.Map<java.lang.String,IClassification> |
getRegisteredClassifications() |
java.util.Map<java.lang.String,IFruitFamily> |
getRegisteredFruitFamilies()
Get all registered fruit families.
|
net.minecraft.item.ItemStack |
getSpeciesNoteStack(com.mojang.authlib.GameProfile researcher,
IAlleleSpecies species) |
java.util.Map<java.lang.String,ISpeciesRoot> |
getSpeciesRoot() |
ISpeciesRoot |
getSpeciesRoot(java.lang.Class<? extends IIndividual> individualClass)
Retrieve a matching
ISpeciesRoot for the given IIndividual-class. |
ISpeciesRoot |
getSpeciesRoot(IIndividual individual)
Retrieve a matching
ISpeciesRoot for the given IIndividual |
ISpeciesRoot |
getSpeciesRoot(net.minecraft.item.ItemStack stack)
Retrieve a matching
ISpeciesRoot for the given itemstack. |
ISpeciesRoot |
getSpeciesRoot(java.lang.String uid)
Retrieve the
ISpeciesRoot with the given uid. |
boolean |
isBlacklisted(java.lang.String uid) |
boolean |
isIndividual(net.minecraft.item.ItemStack stack)
Tests the itemstack for genetic information.
|
void |
registerAllele(IAllele allele,
IChromosomeType... chromosomeTypes)
Registers an allele.
|
void |
registerAlleleHandler(IAlleleHandler handler)
Registers a new IAlleleHandler
|
void |
registerClassification(IClassification classification)
Registers a classification.
|
void |
registerDeprecatedAlleleReplacement(java.lang.String deprecatedAlleleUID,
IAllele replacement)
Registers an old allele UID and the new IAllele to replace instances of it with.
|
void |
registerFruitFamily(IFruitFamily family)
Registers a new fruit family.
|
void |
registerSpeciesRoot(ISpeciesRoot root)
Register a
ISpeciesRoot. |
void registerSpeciesRoot(ISpeciesRoot root)
ISpeciesRoot.root - ISpeciesRoot to register.java.util.Map<java.lang.String,ISpeciesRoot> getSpeciesRoot()
ISpeciesRoot.@Nullable ISpeciesRoot getSpeciesRoot(java.lang.String uid)
ISpeciesRoot with the given uid.uid - Unique id for the species class, i.e. "rootBees", "rootTrees", "rootButterflies".ISpeciesRoot if it exists, null otherwise.@Nullable ISpeciesRoot getSpeciesRoot(net.minecraft.item.ItemStack stack)
ISpeciesRoot for the given itemstack.stack - An itemstack possibly containing NBT data which can be converted by a species root.ISpeciesRoot if found, null otherwise.@Nullable ISpeciesRoot getSpeciesRoot(java.lang.Class<? extends IIndividual> individualClass)
ISpeciesRoot for the given IIndividual-class.individualClass - Class extending IIndividual.ISpeciesRoot if found, null otherwise.ISpeciesRoot getSpeciesRoot(IIndividual individual)
ISpeciesRoot for the given IIndividualboolean isIndividual(net.minecraft.item.ItemStack stack)
@Nullable IIndividual getIndividual(net.minecraft.item.ItemStack stack)
stack - Stack to retrieve genetic information for.java.util.Map<java.lang.String,IAllele> getRegisteredAlleles()
java.util.Collection<IAllele> getRegisteredAlleles(IChromosomeType type)
void registerAllele(IAllele allele, IChromosomeType... chromosomeTypes)
NOTE: Where possible, it is recommended to use IAlleleFactory instead because it has built-in advanced localization support.
allele - IAllele to register.chromosomeTypes - valid chromosomeTypes for this allele.void addValidAlleleTypes(IAllele allele, IChromosomeType... chromosomeTypes)
java.util.Map<java.lang.String,IAllele> getDeprecatedAlleleReplacements()
void registerDeprecatedAlleleReplacement(java.lang.String deprecatedAlleleUID,
IAllele replacement)
deprecatedAlleleUID - the old allele's UIDreplacement - the IAllele that the deprecated Allele will be replaced with.@Nullable IAllele getAllele(java.lang.String uid)
uid - String based unique identifier of the allele to retrieve.java.util.Collection<IChromosomeType> getChromosomeTypes(IAllele allele)
java.util.Map<java.lang.String,IClassification> getRegisteredClassifications()
void registerClassification(IClassification classification)
classification - IClassification to register.IClassification createAndRegisterClassification(IClassification.EnumClassLevel level, java.lang.String uid, java.lang.String scientific)
level - EnumClassLevel of the classification to create.uid - String based unique identifier. Implementation will throw an exception if the key is already taken.scientific - Binomial for the given classification.IClassification for easier chaining.IClassification createAndRegisterClassification(IClassification.EnumClassLevel level, java.lang.String uid, java.lang.String scientific, IClassification... members)
IClassification getClassification(java.lang.String uid)
uid - String based unique identifier of the classification to retrieve.IClassification if found, null otherwise.java.util.Map<java.lang.String,IFruitFamily> getRegisteredFruitFamilies()
void registerFruitFamily(IFruitFamily family)
IFruitFamily getFruitFamily(java.lang.String uid)
void registerAlleleHandler(IAlleleHandler handler)
handler - IAlleleHandler to register.void blacklistAllele(java.lang.String uid)
uid - UID of the allele to blacklist.java.util.Collection<java.lang.String> getAlleleBlacklist()
boolean isBlacklisted(java.lang.String uid)
uid - UID of the species to vet.net.minecraft.item.ItemStack getSpeciesNoteStack(com.mojang.authlib.GameProfile researcher,
IAlleleSpecies species)
researcher - Username of the player who researched this note.species - IAlleleSpecies to encode on the research note.net.minecraft.item.ItemStack getMutationNoteStack(com.mojang.authlib.GameProfile researcher,
IMutation mutation)
researcher - Username of the player who researched this note.mutation - IMutation to encode on the research note.