diff options
author | Martin Robertz <dream-master@gmx.net> | 2019-05-18 11:20:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-18 11:20:25 +0200 |
commit | 99fe4061b451ff190cd75c538e69b6473880843f (patch) | |
tree | 083366b35c4c59721142bfc48d2fadf4c122c2b9 /src/main/java/gregtech/common | |
parent | e5a4139c9b8c1be0eddcd367f3e067bc6ae70708 (diff) | |
parent | 313e10c3b86c88e67ba29726a9d38303b23d7199 (diff) | |
download | GT5-Unofficial-99fe4061b451ff190cd75c538e69b6473880843f.tar.gz GT5-Unofficial-99fe4061b451ff190cd75c538e69b6473880843f.tar.bz2 GT5-Unofficial-99fe4061b451ff190cd75c538e69b6473880843f.zip |
Merge pull request #184 from GTNewHorizons/bmf2
might fix ?
Diffstat (limited to 'src/main/java/gregtech/common')
-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 ; |