diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-05-18 07:37:03 +0200 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-05-18 07:37:03 +0200 |
commit | 313e10c3b86c88e67ba29726a9d38303b23d7199 (patch) | |
tree | 083366b35c4c59721142bfc48d2fadf4c122c2b9 | |
parent | dc99b71aa0a6f67465e23bfe32c29bf62fc8a2ac (diff) | |
download | GT5-Unofficial-313e10c3b86c88e67ba29726a9d38303b23d7199.tar.gz GT5-Unofficial-313e10c3b86c88e67ba29726a9d38303b23d7199.tar.bz2 GT5-Unofficial-313e10c3b86c88e67ba29726a9d38303b23d7199.zip |
might fix ?
https://github.com/GTNewHorizons/NewHorizons/issues/3913
https://github.com/GTNewHorizons/NewHorizons/issues/4421
Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
-rw-r--r-- | src/main/java/gregtech/common/bees/GT_Bee_Mutation.java | 9 |
1 files changed, 5 insertions, 4 deletions
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 852f00e6d6..a83b4c68f1 100644 --- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java +++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java @@ -5,6 +5,7 @@ import forestry.api.genetics.IAllele; import forestry.api.genetics.IGenome; import forestry.api.genetics.IMutationCondition; import forestry.apiculture.genetics.BeeMutation; +import forestry.core.genetics.mutations.Mutation; import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; @@ -35,7 +36,7 @@ public class GT_Bee_Mutation extends BeeMutation { int y = housingCoordinates.posY; int z = housingCoordinates.posZ; - float processedChance = getbasicChance(world, x, y, z, allele0, allele1, genome0, genome1); + float processedChance = getBasicChance(world, x, y, z, allele0, allele1, genome0, genome1); if (processedChance <= 0f) { @@ -51,11 +52,11 @@ public class GT_Bee_Mutation extends BeeMutation { return processedChance; } - protected float getbasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) { - float mutationChance = getBaseChance(); + protected float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) { + float mutationChance = this.getBaseChance(); List<IMutationCondition> mutationConditions = null; try { - Field f = this.getClass().getDeclaredField("mutationConditions"); + Field f = Mutation.class.getDeclaredField("mutationConditions"); f.setAccessible(true); Object o = f.get(this); mutationConditions = o instanceof List ? (List) o : null ; |