mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Fix bee breeding overflowing with mutation.
This commit is contained in:
1 parent
9570cb2982
commit
da4f06a618
4 files changed
+41
-5
No files matched your search
@@ -21,6 +21,8 @@ import forestry.api.apiculture.IBeeRoot;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.core.genetics.mutations.Mutation;
|
||||
|
||||
import static forestry.core.utils.MathUtil.safeMultiply;
|
||||
|
||||
public class BeeMutation extends Mutation implements IBeeMutationCustom {
|
||||
|
||||
public BeeMutation(IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance) {
|
||||
@@ -49,8 +51,8 @@ public class BeeMutation extends Mutation implements IBeeMutationCustom {
|
||||
IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||
IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier();
|
||||
|
||||
processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance);
|
||||
processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance);
|
||||
processedChance = safeMultiply(processedChance, beeHousingModifier.getMutationModifier(genome0, genome1, processedChance));
|
||||
processedChance = safeMultiply(processedChance, beeModeModifier.getMutationModifier(genome0, genome1, processedChance));
|
||||
|
||||
return processedChance;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user