diff --git a/build.properties b/build.properties index 498c399..c099bcb 100644 --- a/build.properties +++ b/build.properties @@ -13,7 +13,7 @@ ccc.version=1.0.4.35 buildcraft.version=7.0.17 ic2.version=2.2.757-experimental -forestry.version=4.0.2.30 +forestry.version=4.0.4.32 waila.version=1.5.10 cofhlib.cf=2246/918 diff --git a/src/net/bdew/gendustry/custom/BeeMutation.scala b/src/net/bdew/gendustry/custom/BeeMutation.scala index 9054e2a..57f1651 100644 --- a/src/net/bdew/gendustry/custom/BeeMutation.scala +++ b/src/net/bdew/gendustry/custom/BeeMutation.scala @@ -11,7 +11,7 @@ package net.bdew.gendustry.custom import forestry.api.apiculture._ import forestry.api.core.{EnumHumidity, EnumTemperature} -import forestry.api.genetics.{AlleleManager, IAllele, IAlleleSpecies} +import forestry.api.genetics.{AlleleManager, IAllele} import net.bdew.gendustry.forestry.BeeModifiers import net.bdew.lib.Misc import net.minecraft.block.Block @@ -85,9 +85,6 @@ class BeeMutation(parent1: IAlleleBeeSpecies, parent2: IAlleleBeeSpecies, result override def getBaseChance = chance - override def getSpecies0: IAlleleSpecies = parent1 - override def getSpecies1: IAlleleSpecies = parent2 - override val getTemplate = getRoot.getTemplate(result.getUID) override def getAllele1 = parent1 override def getAllele0 = parent2 diff --git a/src/net/bdew/gendustry/custom/BeeSpecies.scala b/src/net/bdew/gendustry/custom/BeeSpecies.scala index 43e08bd..1534c9b 100644 --- a/src/net/bdew/gendustry/custom/BeeSpecies.scala +++ b/src/net/bdew/gendustry/custom/BeeSpecies.scala @@ -101,12 +101,12 @@ class BeeSpecies(cfg: ConfigSection, ident: String) extends IAlleleBeeSpecies { excludeSpecies += species import scala.collection.JavaConversions._ getRoot.getPaths(species, getRoot.getKaryotypeKey) foreach { mutation => - if (!excludeSpecies.contains(mutation.getSpecies0)) { - val otherAdvance = getMutationPathLength(mutation.getSpecies0, excludeSpecies) + if (!excludeSpecies.contains(mutation.getAllele0)) { + val otherAdvance = getMutationPathLength(mutation.getAllele0, excludeSpecies) if (otherAdvance > highest) highest = otherAdvance } - if (!excludeSpecies.contains(mutation.getSpecies1)) { - val otherAdvance = getMutationPathLength(mutation.getSpecies1, excludeSpecies) + if (!excludeSpecies.contains(mutation.getAllele1)) { + val otherAdvance = getMutationPathLength(mutation.getAllele1, excludeSpecies) if (otherAdvance > highest) { highest = otherAdvance } diff --git a/src/net/bdew/gendustry/forestry/GeneticsHelper.scala b/src/net/bdew/gendustry/forestry/GeneticsHelper.scala index a1309fe..985c691 100644 --- a/src/net/bdew/gendustry/forestry/GeneticsHelper.scala +++ b/src/net/bdew/gendustry/forestry/GeneticsHelper.scala @@ -47,8 +47,8 @@ object GeneticsHelper { } def checkMutation(m: IMutation, s1: IAlleleSpecies, s2: IAlleleSpecies): Boolean = { - if (m.getSpecies0 == s1 && m.getSpecies1 == s2) return true - if (m.getSpecies0 == s2 && m.getSpecies1 == s1) return true + if (m.getAllele0 == s1 && m.getAllele1 == s2) return true + if (m.getAllele0 == s2 && m.getAllele1 == s1) return true return false } @@ -246,7 +246,7 @@ object GeneticsHelper { Option(m.getSpecialConditions) map (_.toList) getOrElse List.empty } catch { case t: Throwable => - Gendustry.logWarnException("Error getting conditions of mutation %s + %s => %s", t, m.getSpecies0.getUID, m.getSpecies1.getUID, getMutationSpecies(m).getUID) + Gendustry.logWarnException("Error getting conditions of mutation %s + %s => %s", t, m.getAllele0.getUID, m.getAllele1.getUID, getMutationSpecies(m).getUID) List.empty } } \ No newline at end of file diff --git a/src/net/bdew/gendustry/misc/GeneticsCache.scala b/src/net/bdew/gendustry/misc/GeneticsCache.scala index dcc65ba..f17aa46 100644 --- a/src/net/bdew/gendustry/misc/GeneticsCache.scala +++ b/src/net/bdew/gendustry/misc/GeneticsCache.scala @@ -22,10 +22,10 @@ object GeneticsCache { x.getRoot.getUID.compareTo(y.getRoot.getUID) else if (x.getTemplate.apply(0).getUID != y.getTemplate.apply(0).getUID) x.getTemplate.apply(0).getUID.compareTo(y.getTemplate.apply(0).getUID) - else if (x.getSpecies0 != y.getSpecies0) - x.getSpecies0.getUID.compareTo(y.getSpecies0.getUID) + else if (x.getAllele0 != y.getAllele0) + x.getAllele0.getUID.compareTo(y.getAllele0.getUID) else - x.getSpecies1.getUID.compareTo(y.getSpecies1.getUID) + x.getAllele1.getUID.compareTo(y.getAllele1.getUID) } implicit object SpeciesOrdering extends Ordering[IAlleleSpecies] { @@ -58,8 +58,8 @@ object GeneticsCache { for ((_, root) <- AlleleManager.alleleRegistry.getSpeciesRoot; mutation <- root.getMutations(false)) { speciesResultMutations(mutation.getTemplate.apply(0).asInstanceOf[IAlleleSpecies]) += mutation - speciesUsedMutations(mutation.getSpecies0) += mutation - speciesUsedMutations(mutation.getSpecies1) += mutation + speciesUsedMutations(mutation.getAllele0) += mutation + speciesUsedMutations(mutation.getAllele1) += mutation } Gendustry.logDebug("Mutations with multiple results from a single combination:") diff --git a/src/net/bdew/gendustry/nei/MutatronHandler.scala b/src/net/bdew/gendustry/nei/MutatronHandler.scala index da039dc..bc2bd11 100644 --- a/src/net/bdew/gendustry/nei/MutatronHandler.scala +++ b/src/net/bdew/gendustry/nei/MutatronHandler.scala @@ -50,8 +50,8 @@ class MutatronHandler extends BaseRecipeHandler(5, 13) { def getRecipeStack(slot: Int, mutation: IMutation): ItemStack = { val root = mutation.getRoot val individual = slot match { - case 0 => root.templateAsIndividual(root.getTemplate(mutation.getSpecies0.getUID)) - case 1 => root.templateAsIndividual(root.getTemplate(mutation.getSpecies1.getUID)) + case 0 => root.templateAsIndividual(root.getTemplate(mutation.getAllele0.getUID)) + case 1 => root.templateAsIndividual(root.getTemplate(mutation.getAllele1.getUID)) case 2 => root.templateAsIndividual(mutation.getTemplate) } individual.analyze()