Test with stuff + Forestry potential support
This commit is contained in:
parent
5b05cf651b
commit
bd26e441cb
174 changed files with 5602 additions and 0 deletions
63
BM_src/forestry/api/genetics/IMutation.java
Normal file
63
BM_src/forestry/api/genetics/IMutation.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package forestry.api.genetics;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Individuals can be seeded either as hive drops or as mutation results.
|
||||
*
|
||||
* {@link IAlleleRegistry} manages these.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IMutation {
|
||||
|
||||
/**
|
||||
* @return {@link ISpeciesRoot} this mutation is associated with.
|
||||
*/
|
||||
ISpeciesRoot getRoot();
|
||||
|
||||
/**
|
||||
* @return first of the alleles implementing IAlleleSpecies required for this mutation.
|
||||
*/
|
||||
IAllele getAllele0();
|
||||
|
||||
/**
|
||||
* @return second of the alleles implementing IAlleleSpecies required for this mutation.
|
||||
*/
|
||||
IAllele getAllele1();
|
||||
|
||||
/**
|
||||
* @return Array of {@link IAllele} representing the full default genome of the mutated side.
|
||||
*
|
||||
* Make sure to return a proper array for the species class. Returning an allele of the wrong type will cause cast errors on runtime.
|
||||
*/
|
||||
IAllele[] getTemplate();
|
||||
|
||||
/**
|
||||
* @return Unmodified base chance for mutation to fire.
|
||||
*/
|
||||
float getBaseChance();
|
||||
|
||||
/**
|
||||
* @return Collection of localized, human-readable strings describing special mutation conditions, if any.
|
||||
*/
|
||||
Collection<String> getSpecialConditions();
|
||||
|
||||
/**
|
||||
* @param allele
|
||||
* @return true if the passed allele is one of the alleles participating in this mutation.
|
||||
*/
|
||||
boolean isPartner(IAllele allele);
|
||||
|
||||
/**
|
||||
* @param allele
|
||||
* @return the other allele which was not passed as argument.
|
||||
*/
|
||||
IAllele getPartner(IAllele allele);
|
||||
|
||||
/**
|
||||
* @return true if the mutation should not be displayed in the beealyzer.
|
||||
*/
|
||||
boolean isSecret();
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue