mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Fix breaking change to the API in IMutation
This commit is contained in:
1 parent
dd34765223
commit
f020dcf2e2
4 files changed
+19
-7
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user