mirror of
https://github.com/GTNewHorizons/gendustry.git
synced 2026-11-22 13:10:16 +00:00
Update to beta 4.0.4 and revert some of 0e9edc
This commit is contained in:
1 parent
cc7b08cd09
commit
a72cd558fa
6 files changed
+16
-19
No files matched your search
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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:")
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user