diff options
Diffstat (limited to 'src/main/java/gregtech/loaders')
5 files changed, 572 insertions, 29 deletions
diff --git a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java index 2d1083ed79..6437a95a33 100644 --- a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java @@ -26,8 +26,6 @@ public class GT_FuelLoader ItemList.sIndiumConcentrate = GT_Mod.gregtechproxy.addFluid("indiumconcentrate", "Indium Concentrate", null, 1, 295);//TODO CHECK NEW x3
ItemList.sLeadZincSolution = GT_Mod.gregtechproxy.addFluid("leadzincsolution", "Lead-Zinc solution", null, 1, 295);
ItemList.sRocketFuel = GT_Mod.gregtechproxy.addFluid("rocket_fuel", "Rocket Fuel", null, 1, 295);
- //ItemList.sIron3Chloride = GT_Mod.gregtechproxy.addFluid("iron3chloride", "Iron III Chloride", Materials.IronIIIChloride, 1, 295);
- //ItemList.sLifeEssence = GT_Mod.gregtechproxy.addFluid("lifeessence", "Life Essence", Materials.LifeEssence, 1, 295);
new GT_Recipe(new ItemStack(Items.lava_bucket), new ItemStack(Blocks.obsidian), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Copper, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Electrum, 1L), 30, 2);
GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.NaquadahEnriched, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 25000);
@@ -35,7 +33,6 @@ public class GT_FuelLoader GT_Recipe.GT_Recipe_Map.sHugeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahEnriched, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 250000);
GT_Recipe.GT_Recipe_Map.sExtremeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadria, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 500000);
GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Naquadria, 1L)}, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Naquadah, 1L)}, null, null, null, 0, 0, 1000000);
- //GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{null}, new ItemStack[]{null}, null, new FluidStack[]{Materials.FluidNaquadahFuel.getFluid(1000L)}, new FluidStack[]{Materials.Naquadah.getFluid(1000L)}, 0, 0, 2000000);
GT_Values.RA.addFuel(GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 4), null, 4, 5);
GT_Values.RA.addFuel(new ItemStack(Items.experience_bottle, 1), null, 10, 5);
diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java index e57d640d1f..3da43b8213 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -5,11 +5,14 @@ import forestry.api.core.EnumHumidity; import forestry.api.core.EnumTemperature; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IAllele; +import forestry.api.genetics.IAlleleFlowers; import forestry.apiculture.genetics.Bee; import forestry.apiculture.genetics.BeeDefinition; import forestry.apiculture.genetics.BeeVariation; import forestry.apiculture.genetics.IBeeDefinition; +import forestry.apiculture.genetics.alleles.AlleleEffect; import forestry.core.genetics.alleles.AlleleHelper; +import forestry.core.genetics.alleles.EnumAllele; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -17,6 +20,7 @@ import gregtech.api.util.GT_ModHandler; import gregtech.common.items.CombType; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraftforge.common.BiomeDictionary; import org.apache.commons.lang3.text.WordUtils; import java.util.Arrays; @@ -26,11 +30,13 @@ import java.util.Locale; //import forestry.plugins.PluginApiculture; public enum GT_BeeDefinition implements IBeeDefinition { - CLAY(GT_BranchDefinition.ORGANIC, "Clay", true, 0x19d0ec, 0xffdc16) { + //organic + CLAY(GT_BranchDefinition.ORGANIC, "Clay", true, 0xC8C8DA, 0x0000FF) { @Override protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); beeSpecies.addProduct(new ItemStack(Items.clay_ball, 1), 0.15f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem("BiomesOPlenty", "mudball", 1, 0), 0.05f); beeSpecies.setHumidity(EnumHumidity.DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); } @@ -38,18 +44,23 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void setAlleles(IAllele[] template) { template = BeeDefinition.MEADOWS.getTemplate(); + //AlleleHelper.instance.set(template, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.DOWN_1); } @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Diligent"), 20); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY, "Industrious"), getSpecies(FORRESTRY, "Diligent"), 10); + tMutation.requireResource("blockClay"); } }, SLIMEBALL(GT_BranchDefinition.ORGANIC, "SlimeBall", true, 0x4E9E55, 0x00FF15) { @Override protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 15), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STICKY), 0.30f); + beeSpecies.addProduct(new ItemStack(Items.slime_ball, 1), 0.15f); + beeSpecies.addProduct(GT_ModHandler.getModItem("TConstruct", "strangeFood", 1, 0), 0.10f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.STICKY), 0.05f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem("TConstruct", "slime.gel", 1, 2), 0.01f); beeSpecies.setHumidity(EnumHumidity.DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); } @@ -61,7 +72,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Marshy"), CLAY.species, 15); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Marshy"), CLAY.species, 7); + tMutation.requireResource("blockSlime"); } }, PEAT(GT_BranchDefinition.ORGANIC, "Peat", true, 0x906237, 0x58300B) { @@ -69,6 +81,8 @@ public enum GT_BeeDefinition implements IBeeDefinition { protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LIGNIE), 0.30f); beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.15f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "peat", 1, 0), 0.15f); + beeSpecies.addSpecialty(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "mulch", 1, 0), 0.05f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); } @@ -80,14 +94,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Rural"), CLAY.species, 20); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Rural"), CLAY.species, 10); } }, STICKYRESIN(GT_BranchDefinition.ORGANIC, "StickyResin", true, 0x2E8F5B, 0xDCC289) { @Override protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); - beeSpecies.addProduct(ItemList.IC2_Resin.get(1, new Object[0]), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.STICKY), 0.15f); + beeSpecies.addSpecialty(ItemList.IC2_Resin.get(1, new Object[0]), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); } @@ -99,14 +114,15 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(SLIMEBALL.species, PEAT.species, 25); + IBeeMutationCustom tMutation = registerMutation(SLIMEBALL.species, PEAT.species, 15); + tMutation.requireResource("logRubber"); } }, COAL(GT_BranchDefinition.ORGANIC, "Coal", true, 0x666666, 0x525252) { @Override protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LIGNIE), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.COAL), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.COAL), 0.15f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.NORMAL); } @@ -118,17 +134,20 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), PEAT.species, 18); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Industrious"), PEAT.species, 9); + //tMutation.requireResource(Blocks.coal_block, 0); + tMutation.requireResource("blockCoal"); } }, OIL(GT_BranchDefinition.ORGANIC, "Oil", true, 0x4C4C4C, 0x333333) { @Override protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.OIL), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.OIL), 0.15f); beeSpecies.setHumidity(EnumHumidity.DAMP); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setNocturnal(); + beeSpecies.setHasEffect(); } @Override @@ -138,9 +157,373 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(COAL.species, STICKYRESIN.species, 8); + IBeeMutationCustom tMutation = registerMutation(COAL.species, STICKYRESIN.species, 4); } }, + SANDWICH(GT_BranchDefinition.ORGANIC, "Sandwich", true, 0x32CD32, 0xDAA520) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 9), 0.15f); + beeSpecies.addSpecialty(ItemList.Food_Sliced_Cucumber.get(1, new Object[0]), 0.05f); + beeSpecies.addSpecialty(ItemList.Food_Sliced_Onion.get(1, new Object[0]), 0.05f); + beeSpecies.addSpecialty(ItemList.Food_Sliced_Tomato.get(1, new Object[0]), 0.05f); + beeSpecies.addSpecialty(ItemList.Food_Sliced_Cheese.get(1, new Object[0]), 0.05f); + beeSpecies.addSpecialty(new ItemStack(Items.cooked_porkchop, 1, 0), 0.05f); + beeSpecies.addSpecialty(new ItemStack(Items.cooked_beef, 1, 0), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.AGRARIAN.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Agrarian"), getSpecies(MAGICBEES,"TCBatty"), 10); + } + }, + + //IC2 + COOLANT(GT_BranchDefinition.IC2, "Coolant", false, 0x144F5A, 0x2494A2) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 4), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.COOLANT), 0.15f); + beeSpecies.setHumidity(EnumHumidity.ARID); + beeSpecies.setTemperature(EnumTemperature.COLD); + beeSpecies.setHasEffect(); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.ICY.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Icy"), getSpecies(FORRESTRY,"Glacial"), 10); + tMutation.requireResource("blockSnow"); + } + }, + ENERGY(GT_BranchDefinition.IC2, "Energy", false, 0xC11F1F, 0xEBB9B9) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem("ExtraBees", "honeyComb", 1, 12), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.WARM); + beeSpecies.setHasEffect(); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.DEMONIC.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Demonic"), getSpecies(EXTRABEES,"volcanic"), 10); + tMutation.requireResource("blockRuby"); + } + }, + LAPOTRON(GT_BranchDefinition.IC2, "Lapotron", false, 0x6478FF, 0x1414FF) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LAPIS), 0.20f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGY), 0.15f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.LAPOTRON), 0.10f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.ICY); + beeSpecies.setHasEffect(); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.ICY.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(LAPIS.species, ENERGY.species, 6); + tMutation.requireResource("blockLapis"); + } + }, + //Alloy + REDALLOY(GT_BranchDefinition.ALLOY, "RedAlloy", false, 0xE60000, 0xB80000) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDALLOY), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(COPPER.species, REDSTONE.species, 10); + } + }, + REDSTONEALLOY(GT_BranchDefinition.ALLOY, "RedStoneAlloy", false, 0xA50808, 0xE80000) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.REDSTONEALLOY), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, REDALLOY.species, 8); + tMutation.requireResource("blockRedstoneAlloy"); + } + }, + CONDUCTIVEIRON(GT_BranchDefinition.ALLOY, "ConductiveIron", false, 0xCEADA3, 0x817671) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.CONDUCTIVEIRON), 0.15f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.WARM); + beeSpecies.setHasEffect(); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.CULTIVATED.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(REDSTONEALLOY.species, IRON.species, 8); + tMutation.requireResource("blockConductiveIron"); + } + }, + VIBRANTALLOY(GT_BranchDefinition.ALLOY, "VibrantAlloy", false, 0x86A12D, 0xC4F2AE) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.VIBRANTALLOY), 0.15f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.INDUSTRIOUS.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(ENERGETICALLOY.species, getSpecies(FORRESTRY,"Phantasmal"), 6); + tMutation.requireResource("blockVibrantAlloy"); + tMutation.restrictTemperature(EnumTemperature.HOT, EnumTemperature.HELLISH); + } + }, + ENERGETICALLOY(GT_BranchDefinition.ALLOY, "EnergeticAlloy", false, 0xFF9933, 0xFFAD5C) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ENERGETICALLOY), 0.15f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.CULTIVATED.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(REDSTONEALLOY.species, getSpecies(FORRESTRY,"Demonic"), 9); + tMutation.requireResource("blockVibrantAlloy"); + } + }, + ELECTRICALSTEEL(GT_BranchDefinition.ALLOY, "ElectricalSteel", false, 0x787878, 0xD8D8D8) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.ELECTRICALSTEEL), 0.15f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(STEEL.species, getSpecies(FORRESTRY,"Demonic"), 9); + tMutation.requireResource("blockElectricalSteel"); + } + }, + DARKSTEEL(GT_BranchDefinition.ALLOY, "DarkSteel", false, 0x252525, 0x443B44) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.DARKSTEEL), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.COLD); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.CULTIVATED.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(ELECTRICALSTEEL.species, getSpecies(FORRESTRY,"Demonic"), 7); + tMutation.requireResource("blockDarkSteel"); + } + }, + PULSATINGIRON(GT_BranchDefinition.ALLOY, "PulsatingIron", false, 0x6DD284, 0x006600) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 7), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.PULSATINGIRON), 0.15f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.CULTIVATED.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(REDALLOY.species, getSpecies(FORRESTRY,"Ended"), 9); + tMutation.requireResource("blockPulatingIron"); + } + }, + STAINLESSSTEEL(GT_BranchDefinition.ALLOY, "StainlessSteel", false, 0xC8C8DC, 0x778899) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STEEL), 0.10f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STAINLESSSTEL), 0.15f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CHROME), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.HOT); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.CULTIVATED.getTemplate(); + AlleleHelper.instance.set(template, EnumBeeChromosome.EFFECT, AlleleEffect.effectIgnition); + } + + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(CHROME.species, STEEL.species, 3); + tMutation.requireResource("blockPulatingIron"); + } + }, + ENDERIUM(GT_BranchDefinition.ALLOY, "Enderium", false, 0x599087, 0x2E8B57) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.ENDERIUM), 0.15f); + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.CHROME), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.HOT); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.CULTIVATED.getTemplate(); + AlleleHelper.instance.set(template, EnumBeeChromosome.SPEED, GT_Bees.speedBlinding); + //AlleleHelper.instance.set(template, EnumBeeChromosome.EFFECT, AlleleHelper.getAllele(ExtraBeesEffect.TELEPORT.getUID())); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(PLATINUM.species, getSpecies(FORRESTRY,"Phantasmal"), 9); + tMutation.requireResource("blockEnderium"); + } + }, + THAUMIMDUST(GT_BranchDefinition.THAUMIC, "ThaumiumDust", true, 0x7A007A, 0x5C005C) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.THAUMIUMDUST), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.EDENIC.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies(EXTRABEES,"TCFire"), getSpecies(FORRESTRY,"Edenic"), 10); + tMutation.requireResource("blockThaumium"); + tMutation.restrictBiomeType(BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.FOREST); + } + }, + THAUMIMSHARD(GT_BranchDefinition.THAUMIC, "ThaumiumShard", true, 0x9966FF, 0xAD85FF) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.THAUMIUMDUST), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.THAUMIUMSHARD), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.GLACIAL.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(THAUMIMDUST.species, getSpecies(EXTRABEES,"TCWater"), 10); + tMutation.restrictBiomeType(BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.FOREST); + } + }, + AMBER(GT_BranchDefinition.THAUMIC, "Amber", true, 0xEE7700, 0x774B15) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 3), 0.30f); + beeSpecies.addSpecialty(GT_Bees.combs.getStackForType(CombType.AMBER), 0.25f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setHasEffect(); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(THAUMIMDUST.species, STICKYRESIN.species, 10); + tMutation.requireResource("blockAmber"); + } + }, +//gems REDSTONE(GT_BranchDefinition.GEM, "Redstone", true, 0x7D0F0F, 0xD11919) { @Override protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { @@ -157,7 +540,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Demonic"), 20); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Industrious"), getSpecies(FORRESTRY,"Demonic"), 20); } }, LAPIS(GT_BranchDefinition.GEM, "Lapis", true, 0x1947D1, 0x476CDA) { @@ -176,7 +559,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Demonic"), getSpecies("Imperial"), 20); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Demonic"), getSpecies(FORRESTRY,"Imperial"), 20); } }, CERTUS(GT_BranchDefinition.GEM, "CertusQuartz", true, 0x57CFFB, 0xBBEEFF) { @@ -195,7 +578,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Hermitic"), LAPIS.species, 20); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Hermitic"), LAPIS.species, 20); } }, RUBY(GT_BranchDefinition.GEM, "Ruby", true, 0xE6005C, 0xCC0052) { @@ -271,7 +654,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(CERTUS.species, getSpecies("Ended"), 10); + IBeeMutationCustom tMutation = registerMutation(CERTUS.species, getSpecies(FORRESTRY,"Ended"), 10); } }, EMERALD(GT_BranchDefinition.GEM, "Emerald", true, 0x248F24, 0x2EB82E) { @@ -309,7 +692,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Majestic"), CLAY.species, 25); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Majestic"), CLAY.species, 25); } }, TIN(GT_BranchDefinition.METAL, "Tin", true, 0xD4D4D4, 0xDDDDDD) { @@ -328,7 +711,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(CLAY.species, getSpecies("Diligent"), 25); + IBeeMutationCustom tMutation = registerMutation(CLAY.species, getSpecies(FORRESTRY,"Diligent"), 25); } }, LEAD(GT_BranchDefinition.METAL, "Lead", true, 0x666699, 0xA3A3CC) { @@ -558,7 +941,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Heroic"), MANGANESE.species, 5); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Heroic"), MANGANESE.species, 5); tMutation.requireResource(GregTech_API.sBlockMetal7, 11); } }, @@ -619,7 +1002,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { @Override protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Avenging"), PLATINUM.species, 5); + IBeeMutationCustom tMutation = registerMutation(getSpecies(FORRESTRY,"Avenging"), PLATINUM.species, 5); tMutation.requireResource(GregTech_API.sBlockMetal7, 14); } }, @@ -669,6 +1052,12 @@ public enum GT_BeeDefinition implements IBeeDefinition { private final GT_BranchDefinition branch; private final IAlleleBeeSpeciesCustom species; + private final static byte FORRESTRY = 0; + private final static byte EXTRABEES = 1; + private final static byte GENDUSTRY = 2; + private final static byte MAGICBEES = 3; + private final static byte GREGTECH = 4; + private IAllele[] template; private IBeeGenome genome; @@ -677,12 +1066,12 @@ public enum GT_BeeDefinition implements IBeeDefinition { String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH); String species = "species" + WordUtils.capitalize(lowercaseName); - String uid = "forestry." + species; + String uid = "gregtech." + species; String description = "for.description." + species; String name = "for.bees.species." + lowercaseName; this.branch = branch; - this.species = BeeManager.beeFactory.createSpecies(uid, dominant, "GREGTECH", name, description, branch.getBranch(), binomial, primary, secondary); + this.species = BeeManager.beeFactory.createSpecies(uid, dominant, "GTNH", name, description, branch.getBranch(), binomial, primary, secondary); } public static void initBees() { @@ -694,10 +1083,46 @@ public enum GT_BeeDefinition implements IBeeDefinition { } } - private static IAlleleBeeSpecies getSpecies(String name) { - return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString()); + private static IAlleleBeeEffect getEffect(byte modid, String name) { + String s; + switch(modid) { + case EXTRABEES: s = new StringBuilder().append("extrabees.effect.").append(name).toString();break; + case GENDUSTRY: s = new StringBuilder().append("gendustry.effect.").append(name).toString();break; + case MAGICBEES: s = new StringBuilder().append("magicbees.effect").append(name).toString();break; + case GREGTECH: s = new StringBuilder().append("gregtech.effect").append(name).toString();break; + default: s = new StringBuilder().append("forestry.effect").append(name).toString();break; + + } + return (IAlleleBeeEffect) AlleleManager.alleleRegistry.getAllele(s); + } + + private static IAlleleFlowers getFlowers(byte modid, String name) { + String s; + switch(modid) { + case EXTRABEES: s = new StringBuilder().append("extrabees.flowers.").append(name).toString();break; + case GENDUSTRY: s = new StringBuilder().append("gendustry.flowers.").append(name).toString();break; + case MAGICBEES: s = new StringBuilder().append("magicbees.flowers").append(name).toString();break; + case GREGTECH: s = new StringBuilder().append("gregtech.flowers").append(name).toString();break; + default: s = new StringBuilder().append("forestry.flowers").append(name).toString();break; + + } + return (IAlleleFlowers) AlleleManager.alleleRegistry.getAllele(s); + } + + private static IAlleleBeeSpecies getSpecies(byte modid, String name) { + String s; + switch(modid) { + case EXTRABEES: s = new StringBuilder().append("extrabees.species.").append(name).toString();break; + case GENDUSTRY: s = new StringBuilder().append("gendustry.bee.").append(name).toString();break; + case MAGICBEES: s = new StringBuilder().append("magicbees.species").append(name).toString();break; + case GREGTECH: s = new StringBuilder().append("gregtech.effect").append(name).toString();break; + default: s = new StringBuilder().append("forestry.species").append(name).toString();break; + + } + return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(s); } + protected abstract void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies); protected abstract void setAlleles(IAllele[] template); @@ -745,4 +1170,4 @@ public enum GT_BeeDefinition implements IBeeDefinition { return new BeeVariation.RainResist(this); } -} +}
\ No newline at end of file diff --git a/src/main/java/gregtech/loaders/misc/GT_Bees.java b/src/main/java/gregtech/loaders/misc/GT_Bees.java index 227e948fda..afc02efbea 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Bees.java +++ b/src/main/java/gregtech/loaders/misc/GT_Bees.java @@ -1,18 +1,105 @@ package gregtech.loaders.misc; import cpw.mods.fml.common.Loader; +import forestry.api.apiculture.EnumBeeChromosome; +import forestry.api.apiculture.IAlleleBeeSpecies; +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IAlleleArea; +import forestry.api.genetics.IAlleleFloat; +import forestry.api.genetics.IAlleleInteger; +import forestry.core.genetics.alleles.Allele; import gregtech.GT_Mod; import gregtech.common.items.ItemComb; public class GT_Bees { + static IAlleleInteger noFertility; + static IAlleleInteger superFertility; + + static IAlleleInteger noFlowering; + static IAlleleInteger superFlowering; + + static IAlleleArea noTerritory; + static IAlleleArea superTerritory; + + static IAlleleFloat noWork; + static IAlleleFloat speedBlinding; + static IAlleleFloat superSpeed; + public static ItemComb combs; public GT_Bees() { if (Loader.isModLoaded("Forestry") && GT_Mod.gregtechproxy.mGTBees) { + combs = new ItemComb(); combs.initCombsRecipes(); - GT_BeeDefinition.initBees(); + GT_BeeDefinition.initBees(); + } + } + + private static void setupGTAlleles(){ + + noFertility = new AlleleInteger("fertilitySterile", 0, false, EnumBeeChromosome.FERTILITY); + superFertility = new AlleleInteger("fertilityMultiply", 8, false, EnumBeeChromosome.FERTILITY); + + noFlowering = new AlleleInteger("floweringNonpollinating", 0, false, EnumBeeChromosome.FLOWERING); + superFlowering = new AlleleInteger("floweringNaturalistic", 240, false, EnumBeeChromosome.FLOWERING); + + noTerritory = new AlleleArea("areaLethargic", 1, 1, false); + 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); + + + } + + private static class AlleleFloat extends Allele implements IAlleleFloat { + private float value; + + public AlleleFloat(String id, float val, boolean isDominant) { + super("gregtech."+id, "gregtech."+id, isDominant); + this.value = val; + AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPEED); + + } + + @Override + public float getValue(){ + return this.value; + } + } + + private static class AlleleInteger extends Allele implements IAlleleInteger { + + private int value; + + public AlleleInteger(String id, int val, boolean isDominant, EnumBeeChromosome c) { + super("gregtech."+id, "gregtech."+id, isDominant); + this.value = val; + AlleleManager.alleleRegistry.registerAllele(this, c); + } + + @Override + public int getValue(){ + return this.value; + } + } + + private static class AlleleArea extends Allele implements IAlleleArea { + + private int[] value; + + public AlleleArea(String id, int rangeXZ,int rangeY, boolean isDominant) { + super("gregtech."+id, "gregtech."+id, isDominant); + this.value = new int[] {rangeXZ,rangeY,rangeXZ}; + AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.TERRITORY); + } + + @Override + public int[] getValue(){ + return this.value; } } } diff --git a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java index c357d1b64c..e37746d5bd 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java @@ -17,11 +17,44 @@ public enum GT_BranchDefinition { @Override protected void setBranchProperties(IAllele[] alleles) { AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.UP_2); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.DOWN_1); AlleleHelper.instance.set(alleles, EnumBeeChromosome.NOCTURNAL, false); AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.MUSHROOMS); AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.SLOW); } }, + IC2("Industrialis") { + @Override + protected void setBranchProperties(IAllele[] alleles) { + AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.DOWN_1); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.UP_1); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.NOCTURNAL, false); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.WHEAT); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.FASTER); + } + }, + ALLOY("Amalgamis") { + @Override + protected void setBranchProperties(IAllele[] alleles) { + AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.NONE); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.TOLERANT_FLYER, true); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.NOCTURNAL, false); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.AVERAGE); + } + }, + THAUMIC("Arcanis") { + @Override + protected void setBranchProperties(IAllele[] alleles) { + AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.UP_1); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.DOWN_1); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.UP_1); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.DOWN_1); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.NOCTURNAL, true); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.FASTER); + } + }, GEM("Ornamentis") { @Override protected void setBranchProperties(IAllele[] alleles) { @@ -35,6 +68,7 @@ public enum GT_BranchDefinition { @Override protected void setBranchProperties(IAllele[] alleles) { AlleleHelper.instance.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.DOWN_2); + AlleleHelper.instance.set(alleles, EnumBeeChromosome.CAVE_DWELLING, true); AlleleHelper.instance.set(alleles, EnumBeeChromosome.NOCTURNAL, false); AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.JUNGLE); AlleleHelper.instance.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.SLOWER); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index 45e5434ee4..2023253eec 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -366,7 +366,7 @@ public class GT_Loader_Item_Block_And_Fluid Materials.HSSE, Materials.HSSS, Materials.Steeleaf, - Materials.Ichorium + Materials.Ichorium, }, OrePrefixes.block, gregtech.api.enums.Textures.BlockIcons.STORAGE_BLOCKS8); GregTech_API.sBlockGem1 = new GT_Block_Metal("gt.blockgem1", new Materials[]{ |