mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-12 00:08:01 +00:00
Started work on Bloodmagic Bees
Implemented BloodMagicHelper to interface with bloodmagic
This commit is contained in:
1 parent
44ecbbdc45
commit
f5a6ca61ba
9 files changed
+168
-5
No files matched your search
@@ -30,6 +30,7 @@ dependencies {
|
||||
|
||||
compile files("/libs/Thaumcraft-1.7.2-4.1.1.14.jar")
|
||||
compile files("/libs/forestry_1.7.10-2.4.2.31-dev.jar")
|
||||
compile files("/libs/Blood Magic-v1.1.0(1.7.10).jar")
|
||||
}
|
||||
|
||||
processResources
|
||||
|
||||
@@ -38,6 +38,8 @@ public enum BeeClassification implements IClassification
|
||||
|
||||
THERMAL ("Thermal", "Thermametallic"),
|
||||
ADORABLE ("Adorable", "Amabilis"),
|
||||
|
||||
BLOODY ("Bloody", "Sanguis")
|
||||
;
|
||||
|
||||
private String uID;
|
||||
|
||||
@@ -4,6 +4,7 @@ package magicbees.bees;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.apiculture.genetics.Bee;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||
@@ -1370,7 +1371,41 @@ public class BeeGenomeManager
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
|
||||
private static IAllele[] getTemplateBMBase()
|
||||
{
|
||||
IAllele[] genome = getTemplateModBase();
|
||||
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityHigh");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersVanilla");
|
||||
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateBMBloody()
|
||||
{
|
||||
IAllele[] genome = getTemplateBMBase();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BM_BLOODY;
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateBMBound()
|
||||
{
|
||||
IAllele[] genome = getTemplateBMBase();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BM_BOUND;
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
/*--------------------- Other Stuff ---------------------------------- */
|
||||
|
||||
public static ItemStack getBeeNBTForSpecies(BeeSpecies species, EnumBeeType beeType)
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Collection;
|
||||
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import magicbees.main.utils.MoonPhase;
|
||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||
import magicbees.main.utils.compat.EquivalentExchangeHelper;
|
||||
@@ -51,11 +52,11 @@ public class BeeMutation implements IBeeMutation
|
||||
{
|
||||
for (String str : binnieMundane)
|
||||
{
|
||||
FMLLog.info("Registering %s", str);
|
||||
LogHelper.info("Registering %s" + str);
|
||||
try {
|
||||
new BeeMutation(species, Allele.getExtraSpecies(str), ForestryHelper.getTemplateForestryForSpecies("Common"), 15);
|
||||
} catch (Exception e) {
|
||||
FMLLog.info("Unable to register! This mutation will not be available.");
|
||||
LogHelper.info("Unable to register! This mutation will not be available.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -12,6 +13,7 @@ import magicbees.item.types.*;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import magicbees.main.utils.compat.*;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -960,6 +962,27 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
return new ItemStack[0];
|
||||
}
|
||||
},
|
||||
|
||||
//----------------------Bloodmagic Bees---------------------------------
|
||||
BM_BLOODY("BMBloody", "sanguis",
|
||||
BeeClassification.BLOODY, 0xb7102f, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false )
|
||||
{
|
||||
@Override
|
||||
public ItemStack[] getResearchBounty(World world, GameProfile gameProfile, IIndividual iIndividual, int i)
|
||||
{
|
||||
return new ItemStack[0];
|
||||
}
|
||||
},
|
||||
|
||||
BM_BOUND("BMBound", "obligatus",
|
||||
BeeClassification.BLOODY, 0xb7102f, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false )
|
||||
{
|
||||
@Override
|
||||
public ItemStack[] getResearchBounty(World world, GameProfile gameProfile, IIndividual iIndividual, int i)
|
||||
{
|
||||
return new ItemStack[0];
|
||||
}
|
||||
},
|
||||
|
||||
;
|
||||
|
||||
@@ -1082,7 +1105,17 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
{
|
||||
RSA_FLUXED.setInactive();
|
||||
}
|
||||
|
||||
|
||||
// Bloodmagic Bees
|
||||
|
||||
if (BloodMagicHelper.isActive())
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
BM_BLOODY.setInactive();
|
||||
}
|
||||
|
||||
|
||||
AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement("thaumicbees.speciesBlitz", AM_LIGHTNING);
|
||||
@@ -1615,6 +1648,24 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
TE_GELID.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.FROZEN.ordinal()), 10)
|
||||
.setGenome(BeeGenomeManager.getTemplateTEGelid())
|
||||
.register();
|
||||
|
||||
BM_BLOODY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
|
||||
.setGenome(BeeGenomeManager.getTemplateBMBloody())
|
||||
.register();
|
||||
|
||||
BM_BOUND.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
|
||||
.setGenome(BeeGenomeManager.getTemplateBMBound())
|
||||
.register();
|
||||
|
||||
|
||||
|
||||
if (BloodMagicHelper.isActive())
|
||||
{
|
||||
BloodMagicHelper.addAltarRecipeBee(MYSTICAL, BM_BLOODY, 1, 1000, 100, 100);
|
||||
|
||||
BloodMagicHelper.addBindingRecipeBee(BM_BLOODY, BM_BOUND);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ public class MagicBees
|
||||
ArsMagicaHelper.preInit();
|
||||
ThermalExpansionHelper.preInit();
|
||||
RedstoneArsenalHelper.preInit();
|
||||
BloodMagicHelper.preInit();
|
||||
|
||||
this.modConfig.setupBlocks();
|
||||
this.modConfig.setupItems();
|
||||
@@ -70,6 +71,7 @@ public class MagicBees
|
||||
ArsMagicaHelper.init();
|
||||
ThermalExpansionHelper.init();
|
||||
RedstoneArsenalHelper.init();
|
||||
BloodMagicHelper.init();
|
||||
|
||||
worldHandler = new WorldGeneratorHandler();
|
||||
GameRegistry.registerWorldGenerator(worldHandler, 0);
|
||||
@@ -87,6 +89,7 @@ public class MagicBees
|
||||
ArsMagicaHelper.postInit();
|
||||
ThermalExpansionHelper.postInit();
|
||||
RedstoneArsenalHelper.postInit();
|
||||
BloodMagicHelper.postInit();
|
||||
|
||||
this.guiHandler = new GUIHandler();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, this.guiHandler);
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import magicbees.bees.BeeSpecies;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BloodMagicHelper {
|
||||
|
||||
private static boolean isBloodMagicActive = false;
|
||||
public static final String Name = "AWWayofTime";
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isBloodMagicActive;
|
||||
}
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name))
|
||||
{
|
||||
isBloodMagicActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit(){}
|
||||
|
||||
public static void addAltarRecipe(ItemStack requiredItem, ItemStack result, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled)
|
||||
{
|
||||
AltarRecipeRegistry.registerAltarRecipe(result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled);
|
||||
}
|
||||
|
||||
public static void addAltarRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee, int minTier, int liquidRequired, int consumptionRate, int drainRate)
|
||||
{
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.DRONE), outputBee.getBeeItem(EnumBeeType.DRONE), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
}
|
||||
|
||||
public static void addBindingRecipe(ItemStack input, ItemStack output)
|
||||
{
|
||||
BindingRegistry.registerRecipe(output, input);
|
||||
}
|
||||
|
||||
public static void addBindingRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee)
|
||||
{
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.DRONE), outputBee.getBeeItem(EnumBeeType.DRONE));
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS));
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import forestry.api.genetics.IAllele;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.Config;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ForestryHelper
|
||||
{
|
||||
@@ -123,7 +124,7 @@ public class ForestryHelper
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
Config.fBeeComb = ItemInterface.getItem("beeComb");
|
||||
Config.fBeeComb = ItemInterface.getItem("beeCombs");
|
||||
Config.fPollen = ItemInterface.getItem("pollen");
|
||||
Config.fCraftingResource = ItemInterface.getItem("craftingMaterial");
|
||||
Config.fHoneyDrop = ItemInterface.getItem("honeyDrop");
|
||||
|
||||
@@ -397,6 +397,10 @@ magicbees.speciesTEEndearing=Endearing
|
||||
magicbees.speciesTEEndearing.description=....|Apinomicon
|
||||
magicbees.speciesRSAFluxed=Fluxed
|
||||
magicbees.speciesRSAFluxed.description=....|Apinomicon
|
||||
magicbees.speciesBMBloody=Bloody
|
||||
magicbees.speciesBMBloody.description=....|Apinomicon
|
||||
magicbees.speciesBMBound=Bound
|
||||
magicbees.speciesBMBound.description=....|Apinomicon
|
||||
magicbees.species=
|
||||
magicbees.species.description=
|
||||
magicbees.speedBlinding=Blinding
|
||||
|
||||
Reference in new issue
Block a user