Compare commits

..
2 Commits
Author SHA1 Message Date
mezz 19a9c2681c Bump version to 4.0.2 2015-09-29 00:40:19 -07:00
mezz f020dcf2e2 Fix breaking change to the API in IMutation 2015-09-29 00:30:42 -07:00
5 changed files with 20 additions and 8 deletions

No files matched your search

+1 -1
View File
@@ -2,4 +2,4 @@ mcversion=1.7.10
forgeversion=10.13.3.1370-1.7.10
version_major=4
version_minor=0
version_patch=1
version_patch=2
@@ -142,8 +142,8 @@ public class ItemResearchNote extends ItemForestry {
return false;
}
IAlleleSpecies species0 = encoded.getAllele0();
IAlleleSpecies species1 = encoded.getAllele1();
IAlleleSpecies species0 = (IAlleleSpecies) encoded.getAllele0();
IAlleleSpecies species1 = (IAlleleSpecies) encoded.getAllele1();
IAlleleSpecies speciesResult = (IAlleleSpecies) encoded.getTemplate()[root.getKaryotypeKey().ordinal()];
tracker.registerSpecies(species0);
@@ -139,6 +139,16 @@ public abstract class Mutation implements IMutationCustom {
return species1;
}
@Override
public IAlleleSpecies getSpecies0() {
return species0;
}
@Override
public IAlleleSpecies getSpecies1() {
return species1;
}
@Override
public float getBaseChance() {
return chance;
@@ -192,14 +192,16 @@ public class GeneticsUtil {
exclude.add(species);
for (IMutation mutation : species.getRoot().getPaths(species, speciesChromosome)) {
if (!exclude.contains(mutation.getAllele0())) {
int otherAdvance = getGeneticAdvancement(mutation.getAllele0(), exclude, speciesChromosome);
IAlleleSpecies species0 = (IAlleleSpecies) mutation.getAllele0();
IAlleleSpecies species1 = (IAlleleSpecies) mutation.getAllele1();
if (!exclude.contains(species0)) {
int otherAdvance = getGeneticAdvancement(species0, exclude, speciesChromosome);
if (otherAdvance > highest) {
highest = otherAdvance;
}
}
if (!exclude.contains(mutation.getAllele1())) {
int otherAdvance = getGeneticAdvancement(mutation.getAllele1(), exclude, speciesChromosome);
if (!exclude.contains(species1)) {
int otherAdvance = getGeneticAdvancement(species1, exclude, speciesChromosome);
if (otherAdvance > highest) {
highest = otherAdvance;
}