From 7871a490b84e8bd35f4e8f2671c5f5ea85c7728d Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Sat, 22 Sep 2018 01:43:19 +0200 Subject: +added <1% bee mutation rate +fixed crashing w/o mods for bees --- src/main/java/gregtech/loaders/misc/GT_Bees.java | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/main/java/gregtech/loaders/misc/GT_Bees.java') diff --git a/src/main/java/gregtech/loaders/misc/GT_Bees.java b/src/main/java/gregtech/loaders/misc/GT_Bees.java index 8ee26f6b3f..5bfdfca8e2 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Bees.java +++ b/src/main/java/gregtech/loaders/misc/GT_Bees.java @@ -6,30 +6,32 @@ import forestry.api.genetics.*; import forestry.core.genetics.alleles.Allele; import forestry.core.utils.StringUtil; import gregtech.GT_Mod; +import gregtech.common.bees.GT_AlleleHelper; import gregtech.common.items.ItemComb; import gregtech.common.items.ItemDrop; import gregtech.common.items.ItemPollen; import gregtech.common.items.ItemPropolis; +import gregtech.loaders.misc.GT_BeeDefinition; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; public class GT_Bees { - static IAlleleInteger noFertility; - static IAlleleInteger superFertility; + public static IAlleleInteger noFertility; + public static IAlleleInteger superFertility; - static IAlleleInteger noFlowering; - static IAlleleInteger superFlowering; + public static IAlleleInteger noFlowering; + public static IAlleleInteger superFlowering; - static IAlleleArea noTerritory; - static IAlleleArea superTerritory; + public static IAlleleArea noTerritory; + public static IAlleleArea superTerritory; - static IAlleleFloat noWork; - static IAlleleFloat speedBlinding; - static IAlleleFloat superSpeed; + public static IAlleleFloat noWork; + public static IAlleleFloat speedBlinding; + public static IAlleleFloat superSpeed; - static IAlleleInteger blinkLife; - static IAlleleInteger superLife; + public static IAlleleInteger blinkLife; + public static IAlleleInteger superLife; public static ItemPropolis propolis; public static ItemPollen pollen; @@ -38,6 +40,7 @@ public class GT_Bees { public GT_Bees() { if (Loader.isModLoaded("Forestry") && GT_Mod.gregtechproxy.mGTBees) { + GT_AlleleHelper.initialisation(); setupGTAlleles(); propolis = new ItemPropolis(); propolis.initPropolisRecipes(); @@ -62,8 +65,8 @@ public class GT_Bees { superTerritory = new AlleleArea("areaExploratory", 32, 16, false); noWork = new AlleleFloat("speedUnproductive", 0, false); - speedBlinding = (IAlleleFloat) AlleleManager.alleleRegistry.getAllele("magicbees.speedBlinding"); superSpeed = new AlleleFloat("speedAccelerated", 4F, false); + speedBlinding = (IAlleleFloat) AlleleManager.alleleRegistry.getAllele("magicbees.speedBlinding") == null ? new AlleleFloat("speedBlinding", 2f, false) : (IAlleleFloat) AlleleManager.alleleRegistry.getAllele("magicbees.speedBlinding") ; blinkLife = new AlleleInteger("lifeBlink", 2, false, EnumBeeChromosome.LIFESPAN); superLife = new AlleleInteger("lifeEon", 600, false, EnumBeeChromosome.LIFESPAN); -- cgit