diff --git a/.gitignore b/.gitignore index 8725192..0812f20 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ logs/ mods/ saves/ usernamecache.json -options.txt \ No newline at end of file +options.txt +asm diff --git a/src/main/java/magicbees/bees/BeeMutation.java b/src/main/java/magicbees/bees/BeeMutation.java index 0f742cd..0300b18 100644 --- a/src/main/java/magicbees/bees/BeeMutation.java +++ b/src/main/java/magicbees/bees/BeeMutation.java @@ -9,6 +9,7 @@ import magicbees.main.utils.LogHelper; import magicbees.main.utils.MoonPhase; import magicbees.main.utils.compat.AppliedEnergisticsHelper; import magicbees.main.utils.compat.ArsMagicaHelper; +import magicbees.main.utils.compat.BloodMagicHelper; import magicbees.main.utils.compat.BotaniaHelper; import magicbees.main.utils.compat.EquivalentExchangeHelper; import magicbees.main.utils.compat.ExtraBeesHelper; @@ -30,10 +31,9 @@ import forestry.api.apiculture.IBeeRoot; import forestry.api.genetics.IAllele; import forestry.api.genetics.IGenome; -public class BeeMutation implements IBeeMutation -{ - public static void setupMutations() - { +public class BeeMutation implements IBeeMutation { + + public static void setupMutations() { IAlleleBeeSpecies baseA, baseB; BeeMutation mutation; @@ -43,23 +43,17 @@ public class BeeMutation implements IBeeMutation String[] forestryMundane = new String[] { "Forest", "Meadows", "Modest", "Wintry", "Tropical", "Marshy" }; String[] binnieMundane = new String[] { "marble", "rock", "water", "basalt" }; - for (BeeSpecies species : magicMundane) - { - for (String str : forestryMundane) - { + for (BeeSpecies species : magicMundane) { + for (String str : forestryMundane) { new BeeMutation(species, Allele.getBaseSpecies(str), ForestryHelper.getTemplateForestryForSpecies("Common"), 15); } - if (ExtraBeesHelper.isActive()) - { - for (String str : binnieMundane) - { + if (ExtraBeesHelper.isActive()) { + for (String str : binnieMundane) { LogHelper.info("Registering " + str); - try - { + try { new BeeMutation(species, Allele.getExtraSpecies(str), ForestryHelper.getTemplateForestryForSpecies("Common"), 15); } - catch (Exception e) - { + catch (Exception e) { LogHelper.info("Unable to register! This mutation will not be available."); } } @@ -129,52 +123,50 @@ public class BeeMutation implements IBeeMutation new BeeMutation(BeeSpecies.MYSTICAL, BeeSpecies.MUTABLE, BeeSpecies.INVISIBLE, 15); - if (BeeSpecies.COPPER.isActive()) - { + if (BeeSpecies.COPPER.isActive()) { new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Meadows"), BeeSpecies.COPPER, 12) .setBlockRequired("blockCopper"); } - if (BeeSpecies.TIN.isActive()) - { + + if (BeeSpecies.TIN.isActive()) { new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Forest"), BeeSpecies.TIN, 12) .setBlockRequired("blockTin"); } + new BeeMutation(Allele.getBaseSpecies("Common"), Allele.getBaseSpecies("Industrious"), BeeSpecies.IRON, 12) .setBlockRequired(Blocks.iron_block); - if (BeeSpecies.LEAD.isActive()) - { + + if (BeeSpecies.LEAD.isActive()) { baseA = (BeeSpecies.TIN.isActive()) ? BeeSpecies.TIN : (BeeSpecies.COPPER.isActive()) ? BeeSpecies.COPPER : BeeSpecies.IRON; mutation = new BeeMutation(baseA, Allele.getBaseSpecies("Common"), BeeSpecies.LEAD, 10); - if (OreDictionary.getOres("blockLead").size() > 0) - { + if (OreDictionary.getOres("blockLead").size() > 0) { mutation.setBlockRequired("blockLead"); } } - if (BeeSpecies.SILVER.isActive()) - { + + if (BeeSpecies.SILVER.isActive()) { mutation = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Modest"), BeeSpecies.SILVER, 8); - if (OreDictionary.getOres("blockSilver").size() > 0) - { + if (OreDictionary.getOres("blockSilver").size() > 0) { mutation.setBlockRequired("blockSilver"); } } + baseA = (BeeSpecies.EE_MINIUM.isActive()) ? BeeSpecies.EE_MINIUM : Allele.getBaseSpecies("Imperial"); baseB = (BeeSpecies.LEAD.isActive()) ? BeeSpecies.LEAD : BeeSpecies.IRON; new BeeMutation(baseA, baseB, BeeSpecies.GOLD, 8) .setBlockRequired(Blocks.gold_block); - if (BeeSpecies.ALUMINUM.isActive()) - { + if (BeeSpecies.ALUMINUM.isActive()) { new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Cultivated"), BeeSpecies.ALUMINUM, 10) .setBlockRequired("blockAluminum"); } - if (BeeSpecies.ARDITE.isActive()) - { + + if (BeeSpecies.ARDITE.isActive()) { new BeeMutation(Allele.getBaseSpecies("Industrious"), BeeSpecies.INFERNAL, BeeSpecies.ARDITE, 9) .setBlockRequired("blockArdite"); } - if (BeeSpecies.COBALT.isActive()) - { + + if (BeeSpecies.COBALT.isActive()) { mutation = new BeeMutation(Allele.getBaseSpecies("Imperial"), BeeSpecies.INFERNAL, BeeSpecies.COBALT, 9); if (OreDictionary.getOres("nuggetCobalt").size() > 0 && OreDictionary.getOres("blockCobalt").size() > 0) { mutation.setBlockRequired("blockCobalt"); @@ -184,8 +176,8 @@ public class BeeMutation implements IBeeMutation mutation.setBlockRequired("blockNaturalCobalt"); } } - if (BeeSpecies.MANYULLYN.isActive()) - { + + if (BeeSpecies.MANYULLYN.isActive()) { new BeeMutation(BeeSpecies.ARDITE, BeeSpecies.COBALT, BeeSpecies.MANYULLYN, 9) .setBlockRequired("blockManyullyn"); } @@ -232,8 +224,7 @@ public class BeeMutation implements IBeeMutation new BeeMutation(baseA, baseB, BeeSpecies.FLUIX, 17); } - if (ThaumcraftHelper.isActive()) - { + if (ThaumcraftHelper.isActive()) { new BeeMutation(BeeSpecies.WINDY, BeeSpecies.WINDY, BeeSpecies.TC_AIR, 8) .setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.AIR.ordinal()); new BeeMutation(BeeSpecies.FIREY, BeeSpecies.FIREY, BeeSpecies.TC_FIRE, 8) @@ -260,8 +251,7 @@ public class BeeMutation implements IBeeMutation .setBiomeRequired(Type.MOUNTAIN); } - if (ArsMagicaHelper.isActive()) - { + if (ArsMagicaHelper.isActive()) { new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.ETHEREAL, BeeSpecies.AM_ESSENCE, 10); new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.AM_ESSENCE, BeeSpecies.AM_QUINTESSENCE, 7); @@ -279,19 +269,25 @@ public class BeeMutation implements IBeeMutation new BeeMutation(BeeSpecies.SKULKING, BeeSpecies.GHASTLY, BeeSpecies.AM_WIGHT, 8); } - if (EquivalentExchangeHelper.isActive()) - { + if (EquivalentExchangeHelper.isActive()) { new BeeMutation(Allele.getBaseSpecies("Frugal"), BeeSpecies.MUTABLE, BeeSpecies.EE_MINIUM, 8); } - if (RedstoneArsenalHelper.isActive()) - { + if (BloodMagicHelper.isActive()) { + new BeeMutation(BeeSpecies.ELDRITCH, BeeSpecies.EARTHY, BeeSpecies.BM_BLOODY, 8) + .setMoonPhaseBonus(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT, 8) + .setBlockRequired(BloodMagicHelper.bloodStoneBrick); + + new BeeMutation(BeeSpecies.BM_BLOODY, BeeSpecies.ARCANE, BeeSpecies.BM_BOUND, 8) + .setBlockRequired(BloodMagicHelper.masterRitualStone); + } + + if (RedstoneArsenalHelper.isActive()) { new BeeMutation(BeeSpecies.TE_ELECTRUM, BeeSpecies.TE_DESTABILIZED, BeeSpecies.RSA_FLUXED, 10) .setBlockRequired("blockElectrumFlux"); } - if (ThermalExpansionHelper.isActive()) - { + if (ThermalExpansionHelper.isActive()) { new BeeMutation(BeeSpecies.TIN, BeeSpecies.COPPER, BeeSpecies.TE_BRONZE, 12) .setBlockRequired("blockBronze"); @@ -373,13 +369,11 @@ public class BeeMutation implements IBeeMutation private String requiredBlockName; private BiomeDictionary.Type requiredBiomeType; - public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, BeeSpecies resultSpecies, int percentChance) - { + public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, BeeSpecies resultSpecies, int percentChance) { this(species0, species1, resultSpecies.getGenome(), percentChance); } - public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, IAllele[] resultSpeciesGenome, int percentChance) - { + public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, IAllele[] resultSpeciesGenome, int percentChance) { this.parent1 = species0; this.parent2 = species1; this.mutationTemplate = resultSpeciesGenome; @@ -398,38 +392,30 @@ public class BeeMutation implements IBeeMutation } @Override - public float getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) - { + public float getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) { float finalChance = 0f; float chance = this.baseChance * 1f; - if (this.arePartners(allele0, allele1)) - { + if (this.arePartners(allele0, allele1)) { // This mutation applies. Continue calculation. - if (this.moonPhaseStart != null && this.moonPhaseEnd != null) - { + if (this.moonPhaseStart != null && this.moonPhaseEnd != null) { // Only occurs during the phases. - if (this.isMoonRestricted && !MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) - { + if (this.isMoonRestricted && !MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) { chance = 0; } - else if (this.moonPhaseMutationBonus != -1f) - { + else if (this.moonPhaseMutationBonus != -1f) { // There is a bonus to this mutation during moon phases... - if (MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) - { + if (MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) { chance = (int)(chance * this.moonPhaseMutationBonus); } } } - if (this.requiresBlock) - { + if (this.requiresBlock) { Block blockBelow; int blockMeta; int i = 1; - do - { + do { blockBelow = housing.getWorld().getBlock(housing.getXCoord(), housing.getYCoord() - i, housing.getZCoord()); blockMeta = housing.getWorld().getBlockMetadata(housing.getXCoord(), housing.getYCoord() - i, housing.getZCoord()); @@ -437,42 +423,33 @@ public class BeeMutation implements IBeeMutation } while (blockBelow != null && (blockBelow instanceof IBeeHousing || blockBelow == Config.fAlvearyBlock)); - if (this.requiredBlockOreDictEntry != null) - { + if (this.requiredBlockOreDictEntry != null) { int[] dicId = OreDictionary.getOreIDs(new ItemStack(blockBelow, 1, blockMeta)); - if (dicId.length != 0) - { - if (!OreDictionary.getOreName(dicId[0]).equals(this.requiredBlockOreDictEntry)) - { + if (dicId.length != 0) { + if (!OreDictionary.getOreName(dicId[0]).equals(this.requiredBlockOreDictEntry)) { chance = 0; } } - else - { + else { chance = 0; } } - else if (this.requiredBlock != blockBelow || (this.requiredBlockMeta != OreDictionary.WILDCARD_VALUE && - this.requiredBlockMeta != blockMeta)) - { + else if (this.requiredBlock != blockBelow || + (this.requiredBlockMeta != OreDictionary.WILDCARD_VALUE && this.requiredBlockMeta != blockMeta)) { chance = 0; } } - if (this.requiredBiomeType != null) - { + if (this.requiredBiomeType != null) { BiomeDictionary.Type[] types = BiomeDictionary.getTypesForBiome(housing.getWorld().getBiomeGenForCoords(housing.getXCoord(), housing.getZCoord())); boolean found = false; - for (int i = 0; i < types.length; ++i) - { - if (this.requiredBiomeType == types[i]) - { + for (int i = 0; i < types.length; ++i) { + if (this.requiredBiomeType == types[i]) { found = true; break; } } - if (!found) - { + if (!found) { chance = 0; } } @@ -495,38 +472,32 @@ public class BeeMutation implements IBeeMutation } @Override - public IAllele getAllele0() - { + public IAllele getAllele0() { return parent1; } @Override - public IAllele getAllele1() - { + public IAllele getAllele1() { return parent2; } @Override - public IAllele[] getTemplate() - { + public IAllele[] getTemplate() { return mutationTemplate; } @Override - public float getBaseChance() - { + public float getBaseChance() { return baseChance; } @Override - public boolean isPartner(IAllele allele) - { + public boolean isPartner(IAllele allele) { return parent1.getUID().equals(allele.getUID()) || parent2.getUID().equals(allele.getUID()); } @Override - public IAllele getPartner(IAllele allele) - { + public IAllele getPartner(IAllele allele) { IAllele val = parent1; if (val.getUID().equals(allele.getUID())) val = parent2; @@ -534,44 +505,34 @@ public class BeeMutation implements IBeeMutation } @Override - public Collection getSpecialConditions() - { + public Collection getSpecialConditions() { ArrayList conditions = new ArrayList(); - if (this.isMoonRestricted && moonPhaseStart != null && moonPhaseEnd != null) - { - if (moonPhaseStart != moonPhaseEnd) - { + if (this.isMoonRestricted && moonPhaseStart != null && moonPhaseEnd != null) { + if (moonPhaseStart != moonPhaseEnd) { conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresPhase"), moonPhaseStart.getLocalizedNameAlt(), moonPhaseEnd.getLocalizedNameAlt())); } - else - { + else { conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresPhaseSingle"), moonPhaseStart.getLocalizedName())); } } - if (this.requiresBlock) - { - if (this.requiredBlockName != null) - { + if (this.requiresBlock) { + if (this.requiredBlockName != null) { conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresBlock"), LocalizationManager.getLocalizedString(this.requiredBlockName))); } - else if (this.requiredBlockOreDictEntry != null) - { + else if (this.requiredBlockOreDictEntry != null) { ArrayList ores = OreDictionary.getOres(this.requiredBlockOreDictEntry); - if (ores.size() > 0) - { + if (ores.size() > 0) { conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresBlock"), ores.get(0).getDisplayName())); } } - else - { + else { int meta = OreDictionary.WILDCARD_VALUE; - if (this.requiredBlockMeta != OreDictionary.WILDCARD_VALUE) - { + if (this.requiredBlockMeta != OreDictionary.WILDCARD_VALUE) { meta = this.requiredBlockMeta; } conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresBlock"), @@ -579,8 +540,7 @@ public class BeeMutation implements IBeeMutation } } - if (this.requiredBiomeType != null) - { + if (this.requiredBiomeType != null) { String biomeName = this.requiredBiomeType.name().substring(0, 1) + this.requiredBiomeType.name().substring(1).toLowerCase(); conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresBiome"), biomeName)); } @@ -593,39 +553,33 @@ public class BeeMutation implements IBeeMutation } @Override - public IBeeRoot getRoot() - { + public IBeeRoot getRoot() { return BeeManager.beeRoot; } - public boolean arePartners(IAllele alleleA, IAllele alleleB) - { + public boolean arePartners(IAllele alleleA, IAllele alleleB) { return (this.parent1.getUID().equals(alleleA.getUID())) && this.parent2.getUID().equals(alleleB.getUID()) || this.parent1.getUID().equals(alleleB.getUID()) && this.parent2.getUID().equals(alleleA.getUID()); } - public BeeMutation setSecret() - { + public BeeMutation setSecret() { this.isSecret = true; return this; } - public boolean isSecret() - { + public boolean isSecret() { return isSecret; } - public BeeMutation setBlockRequired(Block block) - { + public BeeMutation setBlockRequired(Block block) { this.requiresBlock = true; this.requiredBlock = block; return this; } - public BeeMutation setBlockAndMetaRequired(Block block, int meta) - { + public BeeMutation setBlockAndMetaRequired(Block block, int meta) { this.requiresBlock = true; this.requiredBlock = block; this.requiredBlockMeta = meta; @@ -633,23 +587,20 @@ public class BeeMutation implements IBeeMutation return this; } - public BeeMutation setBlockRequired(String oreDictEntry) - { + public BeeMutation setBlockRequired(String oreDictEntry) { this.requiresBlock = true; this.requiredBlockOreDictEntry = oreDictEntry; return this; } - public BeeMutation setBlockRequiredNameOverride(String blockName) - { + public BeeMutation setBlockRequiredNameOverride(String blockName) { this.requiredBlockName = blockName; return this; } - public BeeMutation setMoonPhaseRestricted(MoonPhase begin, MoonPhase end) - { + public BeeMutation setMoonPhaseRestricted(MoonPhase begin, MoonPhase end) { this.isMoonRestricted = true; this.moonPhaseStart = begin; this.moonPhaseEnd = end; @@ -657,8 +608,7 @@ public class BeeMutation implements IBeeMutation return this; } - public BeeMutation setMoonPhaseBonus(MoonPhase begin, MoonPhase end, float mutationBonus) - { + public BeeMutation setMoonPhaseBonus(MoonPhase begin, MoonPhase end, float mutationBonus) { this.moonPhaseMutationBonus = mutationBonus; this.moonPhaseStart = begin; this.moonPhaseEnd = end; @@ -666,8 +616,7 @@ public class BeeMutation implements IBeeMutation return this; } - public BeeMutation setBiomeRequired(BiomeDictionary.Type biomeType) - { + public BeeMutation setBiomeRequired(BiomeDictionary.Type biomeType) { this.requiredBiomeType = biomeType; return this; diff --git a/src/main/java/magicbees/bees/BeeProductHelper.java b/src/main/java/magicbees/bees/BeeProductHelper.java index b073cab..d6291cf 100644 --- a/src/main/java/magicbees/bees/BeeProductHelper.java +++ b/src/main/java/magicbees/bees/BeeProductHelper.java @@ -362,8 +362,10 @@ public class BeeProductHelper { } public static void initBloodMagicProducts() { - BM_BLOODY.addProduct(ForestryHelper.itemHoneycomb, 10); - BM_BOUND.addProduct(ForestryHelper.itemHoneycomb, 10); + BM_BLOODY.addProduct(Config.combs.getStackForType(CombType.OCCULT), 12) + .addSpecialty(Config.combs.getStackForType(CombType.BM_SANGUINE), 8); + BM_BOUND.addProduct(Config.combs.getStackForType(CombType.BM_SANGUINE), 8) + .addProduct(Config.combs.getStackForType(CombType.OCCULT), 16); } public static void initBotaniaProducts() { diff --git a/src/main/java/magicbees/item/types/CombType.java b/src/main/java/magicbees/item/types/CombType.java index add78cf..b4d451e 100644 --- a/src/main/java/magicbees/item/types/CombType.java +++ b/src/main/java/magicbees/item/types/CombType.java @@ -2,8 +2,10 @@ package magicbees.item.types; import magicbees.main.utils.LocalizationManager; -public enum CombType -{ +public enum CombType { + // Reminder: Order matters! + // Meta value of comb == ordinal of enum value. + MUNDANE("mundane", true), MOLTEN("molten", true), OCCULT("occult", true), @@ -36,6 +38,8 @@ public enum CombType TE_CARBON("TEcarbon", false), TE_LUX("TElux", false), TE_ENDEARING("TEendearing", false), + + BM_SANGUINE("BMSanguine", false), ; private static int[][] colours = new int[][] { @@ -71,30 +75,28 @@ public enum CombType { 0x454545, 0x0F0F0F }, { 0xF5F3A4, 0xC9C87D }, { 0x12E3D9, 0x069E97 }, + + { 0x7F3228, 0xBE1900 }, }; - private CombType(String pName, boolean show) - { + private CombType(String pName, boolean show) { this.name = pName; this.showInList = show; } - public void setHidden() - { + public void setHidden() { this.showInList = false; } private String name; public boolean showInList; - public String getName() - { + public String getName() { return LocalizationManager.getLocalizedString("comb." + this.name); } - public int[] getColours() - { + public int[] getColours() { return colours[this.ordinal()]; } } \ No newline at end of file diff --git a/src/main/java/magicbees/main/Config.java b/src/main/java/magicbees/main/Config.java index 76a70af..db0892a 100644 --- a/src/main/java/magicbees/main/Config.java +++ b/src/main/java/magicbees/main/Config.java @@ -212,20 +212,7 @@ public class Config public static FluidStack teFluidCoal; public static FluidStack teFluidRedstone; public static FluidStack teFluidEnder; - //--- Blood Magic Blocks --- - public static Block bmBloodStoneBrick; - //--- Blood Magic Items --- - public static ItemStack bmIncendium; - public static ItemStack bmMagicales; - public static ItemStack bmSanctus; - public static ItemStack bmAether; - public static ItemStack bmCrepitous; - public static ItemStack bmCrystallos; - public static ItemStack bmTerrae; - public static ItemStack bmAquasalus; - public static ItemStack bmTennebrae; - - + //----- Config State info ---------------------------------- public static Configuration configuration; diff --git a/src/main/java/magicbees/main/utils/CraftingManager.java b/src/main/java/magicbees/main/utils/CraftingManager.java index ca00568..dd3f2ce 100644 --- a/src/main/java/magicbees/main/utils/CraftingManager.java +++ b/src/main/java/magicbees/main/utils/CraftingManager.java @@ -11,6 +11,7 @@ import magicbees.item.types.ResourceType; import magicbees.item.types.WaxType; import magicbees.main.Config; import magicbees.main.utils.compat.ArsMagicaHelper; +import magicbees.main.utils.compat.BloodMagicHelper; import magicbees.main.utils.compat.ForestryHelper; import magicbees.main.utils.compat.ThaumcraftHelper; import magicbees.main.utils.compat.ThermalExpansionHelper; @@ -25,24 +26,21 @@ import net.minecraftforge.oredict.ShapedOreRecipe; import cpw.mods.fml.common.registry.GameRegistry; import forestry.api.recipes.RecipeManagers; -public class CraftingManager -{ - public static void registerLiquidContainers() - { +public class CraftingManager { + + public static void registerLiquidContainers() { registerLiquidContainer(Config.magicCapsule); registerLiquidContainer(Config.voidCapsule); } - public static void setupCrafting() - { + public static void setupCrafting() { // Broken up into seperate sections to make things a bit easier to find. setupVanillaCrafting(); setupCentrifugeRecipes(); setupCarpenterRecipes(); } - private static void setupVanillaCrafting() - { + private static void setupVanillaCrafting() { ItemStack input; ItemStack output; @@ -248,45 +246,40 @@ public class CraftingManager }); // - if (OreDictionary.getOres("ingotCopper").size() <= 0) - { + if (OreDictionary.getOres("ingotCopper").size() <= 0) { NuggetType.COPPER.setInactive(); } - else - { + else { GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotCopper").get(0), new Object[] { "xxx", "xxx", "xxx", 'x', "nuggetCopper" })); } - if (OreDictionary.getOres("ingotTin").size() <= 0) - { + + if (OreDictionary.getOres("ingotTin").size() <= 0) { NuggetType.TIN.setInactive(); } - else - { + else { GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotTin").get(0), new Object[] { "xxx", "xxx", "xxx", 'x', "nuggetTin" })); } - if (OreDictionary.getOres("ingotSilver").size() <= 0) - { + + if (OreDictionary.getOres("ingotSilver").size() <= 0) { NuggetType.SILVER.setInactive(); } - else - { + else { GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotSilver").get(0), new Object[] { "xxx", "xxx", "xxx", 'x', "nuggetSilver" })); } - if (OreDictionary.getOres("ingotLead").size() <= 0) - { + + if (OreDictionary.getOres("ingotLead").size() <= 0) { NuggetType.LEAD.setInactive(); } - else - { + else { GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotLead").get(0), new Object[] { "xxx", "xxx", "xxx", 'x', "nuggetLead" @@ -340,8 +333,7 @@ public class CraftingManager 'S', Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY) }); - for (int level = 1; level <= 8; level++) - { + for (int level = 1; level <= 8; level++) { output = new ItemStack(Config.magnet, 1, level * 2); GameRegistry.addRecipe(new ShapedOreRecipe(output, new Object[] { " d ", "mSm", " B ", @@ -360,16 +352,14 @@ public class CraftingManager new ItemStack(Config.fApicultureBlock, 1, ForestryHelper.ApicultureBlock.APIARY.ordinal()) }); - if (ThaumcraftHelper.isActive()) - { + if (ThaumcraftHelper.isActive()) { input = Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT); output = new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.KNOWLEDGE_FRAGMENT.ordinal()); GameRegistry.addShapelessRecipe(output, new Object[] { input, input, input, input }); - if (Config.thaumaturgeBackpackActive) - { + if (Config.thaumaturgeBackpackActive) { // T1 Thaumaturge's backpack GameRegistry.addRecipe(new ItemStack(Config.thaumaturgeBackpackT1), new Object[] { "SWS", "NCN", "SWS", @@ -381,8 +371,7 @@ public class CraftingManager } } - if (ArsMagicaHelper.isActive()) - { + if (ArsMagicaHelper.isActive()) { input = ItemInterface.getItemStack("apatite"); output = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER, 4); GameRegistry.addShapelessRecipe(output, new Object[] { @@ -396,8 +385,7 @@ public class CraftingManager } } - private static void setupCentrifugeRecipes() - { + private static void setupCentrifugeRecipes() { ItemStack beeswax = ItemInterface.getItemStack("beeswax"); ItemStack propolis = ItemInterface.getItemStack("propolis"); propolis.setItemDamage(ForestryHelper.Propolis.PULSATING.ordinal()); @@ -459,8 +447,7 @@ public class CraftingManager new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.clay_ball) }, new int[] { 100, 60 }); - if (ThaumcraftHelper.isActive()) - { + if (ThaumcraftHelper.isActive()) { RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TC_AIR), new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.feather), Config.propolis.getStackForType(PropolisType.AIR) }, @@ -506,10 +493,11 @@ public class CraftingManager new int[] { 100, 90 }); } - if (ArsMagicaHelper.isActive()) - { + if (ArsMagicaHelper.isActive()) { RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.AM_ESSENCE), - new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Config.amItemResource), new ItemStack(Config.amItemResource) }, + new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), + new ItemStack(Config.amItemResource), + new ItemStack(Config.amItemResource) }, new int[] { 85, 10, 2 }); RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.AM_POTENT), new ItemStack[] { ItemInterface.getItemStack("beeswax"), @@ -517,8 +505,15 @@ public class CraftingManager ItemInterface.getItemStack("honeydew") }, new int[] { 50, 50, 65 }); } - if (ThermalExpansionHelper.isActive()) - { + + if (BloodMagicHelper.isActive()) { + RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.BM_SANGUINE), + new ItemStack[] { Config.wax.getStackForType(WaxType.SOUL), + BloodMagicHelper.bloodShard }, + new int[] { 90, 8 } ); + } + + if (ThermalExpansionHelper.isActive()) { RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TE_DESTABILIZED), new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.DESTABILIZED) }, @@ -532,13 +527,11 @@ public class CraftingManager RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TE_ENDEARING), new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.ENDEARING) }, new int[] { 50, 22 }); - } } - private static void setupCarpenterRecipes() - { + private static void setupCarpenterRecipes() { ItemStack input; ItemStack output; @@ -588,16 +581,13 @@ public class CraftingManager } } - private static void registerLiquidContainer(ItemCapsule baseCapsule) - { + private static void registerLiquidContainer(ItemCapsule baseCapsule) { ItemStack empty = new ItemStack(baseCapsule, 1, 0); ItemStack filled; FluidStack liquid = null; - for (FluidType fluidType : FluidType.values()) - { - switch (fluidType) - { + for (FluidType fluidType : FluidType.values()) { + switch (fluidType) { case EMPTY: liquid = null; break; @@ -612,8 +602,7 @@ public class CraftingManager break; } - if (liquid != null) - { + if (liquid != null) { filled = new ItemStack(baseCapsule, 1, fluidType.ordinal()); FluidContainerRegistry.registerFluidContainer(liquid, filled, empty); diff --git a/src/main/java/magicbees/main/utils/compat/BloodMagicHelper.java b/src/main/java/magicbees/main/utils/compat/BloodMagicHelper.java index 16daee9..b8122b1 100644 --- a/src/main/java/magicbees/main/utils/compat/BloodMagicHelper.java +++ b/src/main/java/magicbees/main/utils/compat/BloodMagicHelper.java @@ -7,12 +7,28 @@ import magicbees.bees.BeeSpecies; import magicbees.main.Config; import magicbees.main.utils.BlockInterface; import magicbees.main.utils.ItemInterface; +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import forestry.api.apiculture.EnumBeeType; public class BloodMagicHelper { + //--- Blood Magic Blocks --- + public static Block bloodStoneBrick; + public static Block masterRitualStone; + //--- Blood Magic Items --- + public static ItemStack bloodShard; + public static ItemStack incendium; + public static ItemStack magicales; + public static ItemStack sanctus; + public static ItemStack aether; + public static ItemStack crepitous; + public static ItemStack crystallos; + public static ItemStack terrae; + public static ItemStack aquasalus; + public static ItemStack tennebrae; + private static boolean isBloodMagicActive = false; public static final String Name = "AWWayofTime"; @@ -41,28 +57,30 @@ public class BloodMagicHelper public static void postInit() { if (isActive()) { - BloodMagicHelper.addAltarRecipeBee(BeeSpecies.MYSTICAL, BeeSpecies.BM_BLOODY, 1, 1000, 100, 100); - - BloodMagicHelper.addBindingRecipeBee(BeeSpecies.BM_BLOODY, BeeSpecies.BM_BOUND); + // Disabled for now until we can figure out a better way to match these. + /*BloodMagicHelper.addAltarRecipeBee(BeeSpecies.MYSTICAL, BeeSpecies.BM_BLOODY, 1, 1000, 100, 100); + BloodMagicHelper.addBindingRecipeBee(BeeSpecies.BM_BLOODY, BeeSpecies.BM_BOUND);*/ } } public static void getBlocks() { - Config.bmBloodStoneBrick = BlockInterface.getBlock(Name, "bloodStoneBrick"); + bloodStoneBrick = BlockInterface.getBlock(Name, "bloodStoneBrick"); + masterRitualStone = BlockInterface.getBlock(Name, "blockMasterStone"); } public static void getItems() { - Config.bmIncendium = ItemInterface.getItemStack(Name, "incendium"); - Config.bmMagicales = ItemInterface.getItemStack(Name, "magicales"); - Config.bmSanctus = ItemInterface.getItemStack(Name, "sanctus"); - Config.bmAether = ItemInterface.getItemStack(Name, "aether"); - Config.bmCrepitous = ItemInterface.getItemStack(Name, "crepitous"); - Config.bmCrystallos = ItemInterface.getItemStack(Name, "crystallos"); - Config.bmTerrae = ItemInterface.getItemStack(Name, "terrae"); - Config.bmAquasalus = ItemInterface.getItemStack(Name, "aquasalus"); - Config.bmTennebrae = ItemInterface.getItemStack(Name, "tennebrae"); + bloodShard = ItemInterface.getItemStack(Name, "weakBloodShard"); + incendium = ItemInterface.getItemStack(Name, "incendium"); + magicales = ItemInterface.getItemStack(Name, "magicales"); + sanctus = ItemInterface.getItemStack(Name, "sanctus"); + aether = ItemInterface.getItemStack(Name, "aether"); + crepitous = ItemInterface.getItemStack(Name, "crepitous"); + crystallos = ItemInterface.getItemStack(Name, "crystallos"); + terrae = ItemInterface.getItemStack(Name, "terrae"); + aquasalus = ItemInterface.getItemStack(Name, "aquasalus"); + tennebrae = ItemInterface.getItemStack(Name, "tennebrae"); } public static void addAltarRecipe(ItemStack requiredItem, ItemStack result, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled) @@ -88,5 +106,4 @@ public class BloodMagicHelper addBindingRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS)); addBindingRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN)); } - } diff --git a/src/main/resources/assets/magicbees/lang/en_US.lang b/src/main/resources/assets/magicbees/lang/en_US.lang index b233d1c..8252724 100644 --- a/src/main/resources/assets/magicbees/lang/en_US.lang +++ b/src/main/resources/assets/magicbees/lang/en_US.lang @@ -70,6 +70,7 @@ comb.TEcarbon=Carbon Comb comb.TEelectric=Electric Comb comb.TElux=Lux Comb comb.TEendearing=Endearing Comb +comb.BMSanguine=Sanguine Comb #Waxes wax.magic=Magic Wax