diff options
author | TimeConqueror <timeconqueror999@gmail.com> | 2021-08-16 02:34:48 +0300 |
---|---|---|
committer | TimeConqueror <timeconqueror999@gmail.com> | 2021-08-16 02:34:48 +0300 |
commit | a0e70820f374b9312b4a1b510f361958e37bd33a (patch) | |
tree | adeccd9790d7d9ee000493efc4cf94237e36b02e | |
parent | b05f1651f62eb87823f4ed9fe5143931b48150d9 (diff) | |
parent | 01f2951352ea3ab9b32e3d9e2343d57cf22c73f7 (diff) | |
download | GT5-Unofficial-a0e70820f374b9312b4a1b510f361958e37bd33a.tar.gz GT5-Unofficial-a0e70820f374b9312b4a1b510f361958e37bd33a.tar.bz2 GT5-Unofficial-a0e70820f374b9312b4a1b510f361958e37bd33a.zip |
Merge remote-tracking branch 'origin/experimental' into experimental
-rw-r--r-- | build.properties | 4 | ||||
-rw-r--r-- | src/main/java/gregtech/common/bees/GT_Bee_Mutation.java | 7 | ||||
-rw-r--r-- | src/main/java/gregtech/loaders/misc/GT_Bees.java | 7 |
3 files changed, 10 insertions, 8 deletions
diff --git a/build.properties b/build.properties index 407cf4ff61..5dad1fe078 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,6 @@ minecraft.version=1.7.10 forge.version=10.13.4.1614-1.7.10 -gt.version=5.09.37.07 +gt.version=5.09.37.09 structurelib.version=1.0.6 ae2.version=rv3-beta-22 applecore.version=1.7.10-1.2.1+107.59407 @@ -14,7 +14,7 @@ cofhlib.version=[1.7.10]1.0.3-175-dev enderio.cf=2219/296 enderio.version=1.7.10-2.3.0.417_beta enderiocore.version=1.7.10-0.1.0.25_beta -forestry.version=4.2.10.58 +forestry.version=4.4.0.0 gc.version=1.7-3.0.12.504 ic2.version=2.2.790-experimental nei.version=1.0.5.111 diff --git a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java index b088f724f5..a4a162ddae 100644 --- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java +++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java @@ -1,6 +1,7 @@ package gregtech.common.bees; import forestry.api.apiculture.*; +import forestry.api.core.IClimateProvider; import forestry.api.genetics.IAllele; import forestry.api.genetics.IGenome; import forestry.api.genetics.IMutationCondition; @@ -37,7 +38,7 @@ public class GT_Bee_Mutation extends BeeMutation { int y = housingCoordinates != null ? housingCoordinates.posY : 0; int z = housingCoordinates != null ? housingCoordinates.posZ : 0; - float processedChance = getBasicChance(world, x, y, z, allele0, allele1, genome0, genome1); + float processedChance = getBasicChance(world, x, y, z, allele0, allele1, genome0, genome1, housing); if (processedChance <= 0f) { return 0f; @@ -53,7 +54,7 @@ public class GT_Bee_Mutation extends BeeMutation { } @SuppressWarnings("unchecked") - private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) { + private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1, IClimateProvider climate) { float mutationChance = this.getBaseChance(); List<IMutationCondition> mutationConditions = null; Field f = FieldUtils.getDeclaredField(Mutation.class, "mutationConditions", true); @@ -69,7 +70,7 @@ public class GT_Bee_Mutation extends BeeMutation { if (mutationConditions != null) for (IMutationCondition mutationCondition : mutationConditions) { - mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1); + mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate); if (mutationChance == 0) { return 0; } diff --git a/src/main/java/gregtech/loaders/misc/GT_Bees.java b/src/main/java/gregtech/loaders/misc/GT_Bees.java index 0e08ac3de6..1d8441e4d6 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Bees.java +++ b/src/main/java/gregtech/loaders/misc/GT_Bees.java @@ -2,6 +2,7 @@ package gregtech.loaders.misc; import cpw.mods.fml.common.Loader; import forestry.api.apiculture.EnumBeeChromosome; +import forestry.api.core.IClimateProvider; import forestry.api.genetics.*; import forestry.core.genetics.alleles.Allele; import forestry.core.utils.StringUtil; @@ -133,7 +134,7 @@ public class GT_Bees { } @Override - public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,IGenome genome1) { + public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1, IClimateProvider climate) { if(world.provider.dimensionId == dimID)return 1; return 0; } @@ -156,8 +157,8 @@ public class GT_Bees { } @Override - public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,IGenome genome1) { - if(world.getBiomeGenForCoords(x, z).biomeID == biomeID) return 1; + public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1, IClimateProvider climate) { + if(climate.getBiome().biomeID == biomeID) return 1; return 0; } |