From fd24320f0efab8843797e8c5c3f5c97ca433ac3e Mon Sep 17 00:00:00 2001 From: OneEyeMaker Date: Sat, 11 Jun 2016 11:35:37 +0300 Subject: [PATCH] Added base code to allow overriding of runes. --- gradlew | 0 .../AlchemicalWizardry.java | 543 ++++++------------ .../BloodMagicConfiguration.java | 136 ++++- .../bloodAltarUpgrade/UpgradedAltars.java | 375 +++++------- 4 files changed, 445 insertions(+), 609 deletions(-) mode change 100644 => 100755 gradlew diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index ec1f894b..81a861f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -11,6 +11,71 @@ import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; +import WayofTime.alchemicalWizardry.api.BlockStack; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; +import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; +import WayofTime.alchemicalWizardry.api.bindingRegistry.UnbindingRegistry; +import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; +import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; +import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +import WayofTime.alchemicalWizardry.api.rituals.Rituals; +import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; +import WayofTime.alchemicalWizardry.api.soulNetwork.ComplexNetworkHandler; +import WayofTime.alchemicalWizardry.api.spell.*; +import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; +import WayofTime.alchemicalWizardry.common.*; +import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; +import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; +import WayofTime.alchemicalWizardry.common.block.ArmourForge; +import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; +import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; +import WayofTime.alchemicalWizardry.common.commands.CommandBloodMagic; +import WayofTime.alchemicalWizardry.common.compress.AdvancedCompressionHandler; +import WayofTime.alchemicalWizardry.common.compress.BaseCompressionHandler; +import WayofTime.alchemicalWizardry.common.compress.StorageBlockCraftingManager; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketMinorGrunt; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRegistry; +import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.*; +import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonChest; +import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; +import WayofTime.alchemicalWizardry.common.entity.mob.*; +import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; +import WayofTime.alchemicalWizardry.common.harvest.*; +import WayofTime.alchemicalWizardry.common.items.ItemIncense; +import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; +import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; +import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; +import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; +import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; +import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; +import WayofTime.alchemicalWizardry.common.omega.*; +import WayofTime.alchemicalWizardry.common.potion.*; +import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; +import WayofTime.alchemicalWizardry.common.rituals.*; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.*; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.*; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.*; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.*; +import WayofTime.alchemicalWizardry.common.spell.simple.*; +import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; +import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; +import WayofTime.alchemicalWizardry.common.thread.CommandDownloadGAPI; +import WayofTime.alchemicalWizardry.common.tileEntity.*; +import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; +import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; +import cpw.mods.fml.common.*; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.*; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.EntityRegistry; +import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -30,276 +95,19 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.RecipeSorter; import net.minecraftforge.oredict.RecipeSorter.Category; - import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - import thaumcraft.api.ItemApi; import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry; -import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -import WayofTime.alchemicalWizardry.api.bindingRegistry.UnbindingRegistry; -import WayofTime.alchemicalWizardry.api.compress.CompressionRegistry; -import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; -import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; -import WayofTime.alchemicalWizardry.api.rituals.Rituals; -import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler; -import WayofTime.alchemicalWizardry.api.soulNetwork.ComplexNetworkHandler; -import WayofTime.alchemicalWizardry.api.spell.SpellEffectRegistry; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf; -import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool; -import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryFuelHandler; -import WayofTime.alchemicalWizardry.common.ClientToServerPacketHandler; -import WayofTime.alchemicalWizardry.common.CommonProxy; -import WayofTime.alchemicalWizardry.common.LifeBucketHandler; -import WayofTime.alchemicalWizardry.common.LifeEssence; -import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.achievements.ModAchievements; -import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry; -import WayofTime.alchemicalWizardry.common.block.ArmourForge; -import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; -import WayofTime.alchemicalWizardry.common.book.BloodMagicGuide; -import WayofTime.alchemicalWizardry.common.commands.CommandBloodMagic; -import WayofTime.alchemicalWizardry.common.compress.AdvancedCompressionHandler; -import WayofTime.alchemicalWizardry.common.compress.BaseCompressionHandler; -import WayofTime.alchemicalWizardry.common.compress.StorageBlockCraftingManager; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketMinorGrunt; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRegistry; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntEarth; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntFire; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardian; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianEarth; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianFire; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianIce; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianWind; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntIce; -import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntWind; -import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonChest; -import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityAirElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; -import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; -import WayofTime.alchemicalWizardry.common.guide.RecipeHolder; -import WayofTime.alchemicalWizardry.common.harvest.AgriCraftCropHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; -import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry; -import WayofTime.alchemicalWizardry.common.items.ItemIncense; -import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; -import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; -import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; -import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmFire; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWater; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWind; -import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; -import WayofTime.alchemicalWizardry.common.potion.PotionAmphibian; -import WayofTime.alchemicalWizardry.common.potion.PotionBoost; -import WayofTime.alchemicalWizardry.common.potion.PotionDeaf; -import WayofTime.alchemicalWizardry.common.potion.PotionDemonCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionDrowning; -import WayofTime.alchemicalWizardry.common.potion.PotionFeatherFall; -import WayofTime.alchemicalWizardry.common.potion.PotionFireFuse; -import WayofTime.alchemicalWizardry.common.potion.PotionFlameCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionFlight; -import WayofTime.alchemicalWizardry.common.potion.PotionHeavyHeart; -import WayofTime.alchemicalWizardry.common.potion.PotionIceCloak; -import WayofTime.alchemicalWizardry.common.potion.PotionInhibit; -import WayofTime.alchemicalWizardry.common.potion.PotionPlanarBinding; -import WayofTime.alchemicalWizardry.common.potion.PotionProjectileProtect; -import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; -import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray; -import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden; -import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBinding; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBiomeChanger; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectContainment; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectCrafting; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectCrushing; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectDemonPortal; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectEllipsoid; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectEvaporation; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectExpulsion; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredEarth; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredKnife; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFlight; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFullStomach; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectGrowth; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectHarvest; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectHealing; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectInterdiction; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectItemRouting; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectItemSuction; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectJumping; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLava; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLeap; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLifeConduit; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectMagnetic; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectOmegaStalling; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectOmegaTest; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSpawnWard; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSphereCreator; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSummonMeteor; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSupression; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectUnbinding; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectVeilOfEvil; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWater; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWellOfSuffering; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeDefaultEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeDefensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeEnvironmentalEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEMeleeOffensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileDefaultEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileDefensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileEnvironmentalEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEProjectileOffensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfDefaultEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfDefensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfEnvironmentalEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSESelfOffensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolDefaultEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolDefensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolEnvironmentalEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.earth.CSEToolOffensiveEarth; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeDefaultFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeDefensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeEnvironmentalFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEMeleeOffensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileDefaultFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileDefensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileEnvironmentalFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEProjectileOffensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfDefaultFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfDefensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfEnvironmentalFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSESelfOffensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolDefaultFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolDefensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolEnvironmentalFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.fire.CSEToolOffensiveFire; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeDefaultIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeDefensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeEnvironmentalIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEMeleeOffensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileDefaultIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileDefensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileEnvironmentalIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEProjectileOffensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfDefaultIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfDefensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfEnvironmentalIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSESelfOffensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolDefaultIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolDefensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolEnvironmentalIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.ice.CSEToolOffensiveIce; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeDefaultWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeDefensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeEnvironmentalWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEMeleeOffensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileDefaultWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileDefensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileEnvironmentalWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEProjectileOffensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfDefaultWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfDefensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfEnvironmentalWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSESelfOffensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolDefaultWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolDefensiveWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolEnvironmentalWind; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.cse.wind.CSEToolOffensiveWind; -import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellEarthBender; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellExplosions; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellFireBurst; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellFrozenWater; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellHolyBlast; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellLightningBolt; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave; -import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust; -import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; -import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import WayofTime.alchemicalWizardry.common.thread.CommandDownloadGAPI; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; -import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; -import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; -import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; -import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver; -import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; -import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; -import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.Mod.Instance; -import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLInterModComms; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory") public class AlchemicalWizardry { public static boolean parseTextFiles = false; - + public static boolean doMeteorsDestroyBlocks = true; public static String[] diamondMeteorArray; public static int diamondMeteorRadius; @@ -492,6 +300,12 @@ public class AlchemicalWizardry public static boolean causeHungerChatMessage = true; public static boolean disableBoundToolsRightClick; + public static BlockStack[] secondTierRunes = new BlockStack[10]; + public static BlockStack[] thirdTierRunes = new BlockStack[10]; + public static BlockStack[] fourthTierRunes = new BlockStack[10]; + public static BlockStack[] fifthTierRunes = new BlockStack[10]; + public static BlockStack[] sixthTierRunes = new BlockStack[10]; + public static List wellBlacklist; public static Logger logger = LogManager.getLogger("BloodMagic"); @@ -547,7 +361,7 @@ public class AlchemicalWizardry public static String entityMinorDemonGruntGuardianWindID = "AW022"; public static String entityMinorDemonGruntGuardianIceID = "AW023"; public static String entityMinorDemonGruntGuardianEarthID = "AW024"; - + public static boolean isDemonRitualCreativeOnly = false; public static Fluid lifeEssenceFluid; @@ -605,7 +419,7 @@ public class AlchemicalWizardry TEDemonPortal.loadBuildingList(); ComplexNetworkHandler.load(); - + MinecraftForge.EVENT_BUS.register(new LifeBucketHandler()); BloodMagicConfiguration.init(new File(event.getModConfigurationDirectory(), "AWWayofTime.cfg")); @@ -883,6 +697,7 @@ public class AlchemicalWizardry GameRegistry.registerFuelHandler(new AlchemicalWizardryFuelHandler()); //Gui registration + BloodMagicConfiguration.finishLoading(); UpgradedAltars.loadAltars(); ArmourForge.initializeRecipes(); TEPlinth.initialize(); @@ -986,7 +801,7 @@ public class AlchemicalWizardry SummoningRegistry.registerSummon(new SummoningHelperAW(entityShadeElementalID), new ItemStack[]{tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); SummoningRegistry.registerSummon(new SummoningHelperAW(entityHolyElementalID), new ItemStack[]{sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); // SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityMinorDemonGruntID), new ItemStack[]{incendiumStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); - + //Custom mobs EntityRegistry.registerModEntity(EntityFallenAngel.class, "FallenAngel", 20, this, 80, 3, true); EntityRegistry.registerModEntity(EntityLowerGuardian.class, "LowerGuardian", 21, this, 80, 3, true); @@ -1031,7 +846,7 @@ public class AlchemicalWizardry MeteorRegistry.registerMeteorParadigm(new ItemStack(Items.nether_star), netherStarMeteorArray, netherStarMeteorRadius); ItemStack stickStack = new ItemStack(Items.stick, 1, craftingConstant); - + //Register spell component recipes ItemStack complexSpellCrystalStack = new ItemStack(ModItems.itemComplexSpellCrystal); ItemStack quartzRodStack = new ItemStack(ModItems.baseItems, 1, 0); @@ -1071,7 +886,7 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystal), "lsl", "sls", "lsl", 'l', lifeShardStack, 's', soulShardStack); GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystal, 4, 1), "ss", "ss", 's', new ItemStack(ModBlocks.blockCrystal, 1, 0)); - + ItemStack magicalesCraftedCableStack = new ItemStack(ModItems.baseItems, 5, 2); ItemStack crackedRunicPlateStackCrafted = new ItemStack(ModItems.baseItems, 2, 15); @@ -1110,13 +925,13 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemHarvestSigil), "mgm", "gsg", "mom", 's', etherealSlateStack, 'o', archmageBloodOrbStack, 'g', new ItemStack(Items.golden_hoe), 'm', new ItemStack(Blocks.dirt))); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 5), "bsb", "grg", "bob", 's', etherealSlateStack, 'o', archmageBloodOrbStack, 'r', speedRuneStack, 'b', emptyBucketStack, 'g', goldIngotStack)); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemCompressionSigil), "pop", "csc", "obo", 'b', masterBloodOrbStack, 'p', new ItemStack(Blocks.piston), 'c', new ItemStack(Blocks.crafting_table), 's', demonSlateStack, 'o', obsidianStack)); - + AlchemyRecipeRegistry.registerRecipe(crackedRunicPlateStackCrafted, 10, new ItemStack[]{imbuedSlateStack, imbuedSlateStack, concentratedCatalystStack}, 4); AlchemyRecipeRegistry.registerRecipe(runicPlateStack, 30, new ItemStack[]{crackedRunicPlateStack, terraeStack}, 5); AlchemyRecipeRegistry.registerRecipe(imbuedRunicPlateStack, 100, new ItemStack[]{magicalesStack, incendiumStack, runicPlateStack, runicPlateStack, aquasalusStack}, 5); AlchemyRecipeRegistry.registerRecipe(complexSpellCrystalStack, 50, new ItemStack[]{new ItemStack(ModItems.blankSpell), weakBloodShardStack, weakBloodShardStack, diamondStack, goldIngotStack}, 3); AlchemyRecipeRegistry.registerRecipe(soulRunicPlateStack, 150, new ItemStack[]{imbuedRunicPlateStack, soulShardStack, soulShardStack, weakBloodShardStack, diamondStack}, 6); - + GameRegistry.addRecipe(new ItemStack(ModBlocks.blockConduit, 1, 0), "q q", "ccc", "q q", 'q', quartzRodStack, 'c', magicalesCableStack); GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 0), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', projectileCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack); @@ -1163,7 +978,7 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemSigilOfEnderSeverance), "ptp", "ese", "pop", 's', new ItemStack(ModItems.demonicSlate), 't', weakBloodShardStack, 'o', masterBloodOrbStack, 'e', new ItemStack(Items.ender_eye), 'p', new ItemStack(Items.ender_pearl))); GameRegistry.addShapelessRecipe(enderShardCraftedStack, weakBloodShardStack, new ItemStack(Items.ender_pearl)); - + GameRegistry.addRecipe(new ItemStack(ModItems.inputRoutingFocus), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', glassStack); GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 0), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', stoneStack); GameRegistry.addRecipe(new ItemStack(ModItems.outputRoutingFocus, 1, 1), "sgs", "geg", "sgs", 'e', enderShardStack, 's', stickStack, 'g', new ItemStack(Blocks.sandstone)); @@ -1176,7 +991,7 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 1), "1s1", "grg", "bob", 'o', transcendentBloodOrbStack, 'r', bloodRuneStack, 'g', etherealSlateStack, 'b', magicalesStack, '1', virtusStack, 's', soulShardStack); GameRegistry.addRecipe(dawnRitualDivinerStack, " d ", "srs", " d ", 'd', new ItemStack(ModItems.dawnScribeTool), 's', etherealSlateStack, 'r', duskRitualDivinerStack); - + AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.flint, 2, 0), 1, new ItemStack[]{new ItemStack(Blocks.gravel), new ItemStack(Items.flint)}, 1); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.grass), 2, new ItemStack[]{new ItemStack(Blocks.dirt), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.wheat_seeds), new ItemStack(Items.wheat_seeds)}, 1); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.leather, 3, 0), 2, new ItemStack[]{new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), waterBucketStack, new ItemStack(Items.flint)}, 1); @@ -1197,7 +1012,7 @@ public class AlchemicalWizardry AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.ghast_tear, 2), 100, new ItemStack[]{ghastTearStack, concentratedCatalystStack, weakBloodShardStack, new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.soul_sand)}, 5); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.coal, 5), 1, new ItemStack[]{new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1)}, 1); AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.clay_ball, 4), 5, new ItemStack[]{new ItemStack(Blocks.sand), waterBucketStack}, 2); - + ItemIncense.registerIncenseRecipes(); GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrucible), "i i", "sis", " S ", 's', new ItemStack(Blocks.stone_slab), 'i', ironIngotStack, 'S', stoneStack); } @@ -1267,14 +1082,14 @@ public class AlchemicalWizardry { isThaumcraftLoaded = false; } - + if(Loader.isModLoaded("guideapi")) { long initialTime = System.nanoTime(); RecipeHolder.init(); long finalTime = System.nanoTime(); AlchemicalWizardry.logger.info("Recipe Holder initialized: took " + (finalTime - initialTime)/1000000f + "ms."); - + ModItems.itemMailCatalogue = new ItemMailOrderCatalogue().setUnlocalizedName("itemMailCatalogue"); GameRegistry.registerItem(ModItems.itemMailCatalogue, "itemMailCatalogue"); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.itemMailCatalogue), new ItemStack(Items.book), new ItemStack(Items.dye, 1, 0), new ItemStack(Items.feather), new ItemStack(Blocks.glass, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.glass, 1, OreDictionary.WILDCARD_VALUE)); @@ -1287,9 +1102,9 @@ public class AlchemicalWizardry isForestryLoaded = true; ModItems.itemBloodFrame = new ItemBloodFrame().setUnlocalizedName("bloodFrame"); - + ItemStack provenFrame = GameRegistry.findItemStack("Forestry", "frameImpregnated", 1); - + if(provenFrame !=null) { AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), provenFrame, 3, 30000, 20, 20, false); @@ -1304,19 +1119,19 @@ public class AlchemicalWizardry PamHarvestCompatRegistry.registerPamHandlers(); AlchemicalWizardry.logger.info("Loaded Harvestcraft Handlers!"); } - - if(Loader.isModLoaded("MineTweaker3")) + + if(Loader.isModLoaded("MineTweaker3")) { MineTweakerIntegration.register(); AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration"); } - + if(Loader.isModLoaded("AgriCraft")) { HarvestRegistry.registerHarvestHandler(new AgriCraftCropHarvestHandler()); AlchemicalWizardry.logger.info("Loaded AgriCraft Handlers!"); } - + isBotaniaLoaded = Loader.isModLoaded("Botania"); isPneumaticCraftLoaded = Loader.isModLoaded("PneumaticCraft"); isFMPLoaded = Loader.isModLoaded("ForgeMultipart"); @@ -1324,18 +1139,18 @@ public class AlchemicalWizardry BloodMagicConfiguration.loadBlacklist(); BloodMagicConfiguration.blacklistRituals(); - + DemonVillageLootRegistry.init(); - + this.initCompressionHandlers(); - + // if(parseTextFiles) // this.parseTextFile(); - + // this.createItemTextureFiles(); } - + @Optional.Method(modid = "guideapi") public static void registerBMBook() { @@ -1418,79 +1233,79 @@ public class AlchemicalWizardry { if(!AlchemicalWizardry.potionDisableRegen) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.ghast_tear), Potion.regeneration.id, 450); - + if(!AlchemicalWizardry.potionDisableNightVision) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.golden_carrot), Potion.nightVision.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableFireResistance) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.magma_cream), Potion.fireResistance.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableWaterBreathing) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.water_bucket), Potion.waterBreathing.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableMoveSpeed) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.sugar), Potion.moveSpeed.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableInstantHealth) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.speckled_melon), Potion.heal.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisablePoison) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.spider_eye), Potion.poison.id, 450); - + if(!AlchemicalWizardry.potionDisableBlindness) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.dye, 1, 0), Potion.blindness.id, 450); - + if(!AlchemicalWizardry.potionDisableWeakness) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.fermented_spider_eye), Potion.weakness.id, 450); - + if(!AlchemicalWizardry.potionDisableStrength) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.blaze_powder), Potion.damageBoost.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableJumpBoost) AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.aether), Potion.jump.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableSlowness) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.clay_ball), Potion.moveSlowdown.id, 450); - + if(!AlchemicalWizardry.potionDisableMining) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.redstone), Potion.digSpeed.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableDrowning) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.potionitem, 1, 0), AlchemicalWizardry.customPotionDrowning.id, 450); - + if(!AlchemicalWizardry.potionDisableInvisibility) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.glass_bottle), Potion.invisibility.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableResistance) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.diamond), Potion.resistance.id, 2 * 60 * 20); - + if(!AlchemicalWizardry.potionDisableSaturation) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.poisonous_potato), Potion.field_76443_y.id, 2); //saturation - + if(!AlchemicalWizardry.potionDisableHealthBoost) AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost - + if(!AlchemicalWizardry.potionDisableAbsorption) AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption - + if(!AlchemicalWizardry.potionDisableBoost) AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 60 * 20); - + if(!AlchemicalWizardry.potionDisableFlight) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 60 * 20); // 1 * - + if(!AlchemicalWizardry.potionDisableReciprocation) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 60 * 20); // 1 * - + if(!AlchemicalWizardry.potionDisablePlanarBinding) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.ender_pearl), AlchemicalWizardry.customPotionPlanarBinding.id, 60 * 20); // 1 * - + if(!AlchemicalWizardry.potionDisableSoulFray) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Blocks.soul_sand), AlchemicalWizardry.customPotionSoulFray.id, 60 * 20); - + if(!AlchemicalWizardry.potionDisableSoulHarden) AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.baseItems, 1, 16), AlchemicalWizardry.customPotionSoulHarden.id, 60 * 20); - + if(!AlchemicalWizardry.potionDisableDeafness) AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.slime_ball), AlchemicalWizardry.customPotionDeaf.id, 60 * 20); } @@ -1567,11 +1382,11 @@ public class AlchemicalWizardry Rituals.registerRitual("AW031Convocation",isDemonRitualCreativeOnly ? 10 : 2, AlchemicalWizardry.ritualCostConvocation[0], new RitualEffectDemonPortal(), "Convocation of the Damned", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleDemon.png"), 220, 22, 22, 255, 0, 0.501, 0.501, 0, 5, false)); Rituals.registerRitual("AW032Symmetry", 2, AlchemicalWizardry.ritualCostSymmetry[0], new RitualEffectOmegaTest(), "Symmetry of the Omega"); Rituals.registerRitual("AW033Stalling", 2, AlchemicalWizardry.ritualCostStalling[0], new RitualEffectOmegaStalling(), "Duet of the Fused Souls"); - + Rituals.registerRitual("AW034Crafting", 1, AlchemicalWizardry.ritualCostCrafting[0], new RitualEffectCrafting(), "Rhythm of the Beating Anvil"); - + Rituals.registerRitual("AW035PhantomHands", 1, AlchemicalWizardry.ritualCostPhantomHands[0], new RitualEffectItemRouting(), "Orchestra of the Phantom Hands"); - + Rituals.registerRitual("AW036SphereIsland", 2, AlchemicalWizardry.ritualCostSphereIsland[0], new RitualEffectSphereCreator(), "Blood of the New Moon"); //Rituals.registerRitual(1,100,new RitualEffectApiaryOverclock(),"Apiary Overclock")); } @@ -1599,7 +1414,7 @@ public class AlchemicalWizardry { CombinedPotionRegistry.registerCombinedPotionRecipe(customPotionFlameCloak, Potion.moveSpeed, Potion.regeneration); } - + public static void initReagentRegistries() { ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.sanctus), new ReagentStack(ReagentRegistry.sanctusReagent, 1000)); @@ -1617,24 +1432,24 @@ public class AlchemicalWizardry ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 6), new ReagentStack(ReagentRegistry.virtusReagent, 1000)); ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 7), new ReagentStack(ReagentRegistry.reductusReagent, 1000)); ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 8), new ReagentStack(ReagentRegistry.potentiaReagent, 1000)); - + OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater((OmegaArmour)ModItems.boundHelmetWater, (OmegaArmour)ModItems.boundPlateWater, (OmegaArmour)ModItems.boundLeggingsWater, (OmegaArmour)ModItems.boundBootsWater)); OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth((OmegaArmour)ModItems.boundHelmetEarth, (OmegaArmour)ModItems.boundPlateEarth, (OmegaArmour)ModItems.boundLeggingsEarth, (OmegaArmour)ModItems.boundBootsEarth)); OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind((OmegaArmour)ModItems.boundHelmetWind, (OmegaArmour)ModItems.boundPlateWind, (OmegaArmour)ModItems.boundLeggingsWind, (OmegaArmour)ModItems.boundBootsWind)); OmegaRegistry.registerParadigm(ReagentRegistry.incendiumReagent, new OmegaParadigmFire((OmegaArmour)ModItems.boundHelmetFire, (OmegaArmour)ModItems.boundPlateFire, (OmegaArmour)ModItems.boundLeggingsFire, (OmegaArmour)ModItems.boundBootsFire)); } - + public static void initDemonPacketRegistiry() { DemonPacketRegistry.registerDemonPacket("angel", new DemonPacketMinorGrunt()); } - + public static void initiateRegistry() { SpellEffectRegistry.initiateRegistry(); - - + + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefaultFire()); SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileOffensiveFire()); SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefensiveFire()); @@ -1651,7 +1466,7 @@ public class AlchemicalWizardry SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolOffensiveFire()); SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefensiveFire()); SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolEnvironmentalFire()); - + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefaultIce()); SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileOffensiveIce()); SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefensiveIce()); @@ -1685,7 +1500,7 @@ public class AlchemicalWizardry SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolOffensiveWind()); SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefensiveWind()); SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolEnvironmentalWind()); - + SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefaultEarth()); SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileOffensiveEarth()); SpellEffectRegistry.registerSpellEffect(SpellParadigmProjectile.class, new CSEProjectileDefensiveEarth()); @@ -1703,21 +1518,21 @@ public class AlchemicalWizardry SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolDefensiveEarth()); SpellEffectRegistry.registerSpellEffect(SpellParadigmTool.class, new CSEToolEnvironmentalEarth()); } - + public void initCompressionHandlers() { StorageBlockCraftingManager.getInstance().addStorageBlockRecipes(); CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.glowstone_dust, 4, 0), new ItemStack(Blocks.glowstone), 64)); CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.snowball, 4, 0), new ItemStack(Blocks.snow), 8)); CompressionRegistry.registerHandler(new AdvancedCompressionHandler()); - + CompressionRegistry.registerItemThreshold(new ItemStack(Blocks.cobblestone), 64); } - + // public void createItemTextureFiles() // { // File textFiles = new File("config/BloodMagic/itemJsonFiles"); -// +// // File bmDirectory = new File("src/main/resources/assets/alchemicalwizardryJsonFiles"); // if(!bmDirectory.exists()) // { @@ -1725,9 +1540,9 @@ public class AlchemicalWizardry // } // // String[] itemStrings = new String[]{"apple", "apple"}; -// +// // String prefix = "alchemicalwizardry:items/"; -// +// // try // { // for(int i=0; i 3L) //// { -//// +//// //// }else // { // PrintWriter writer = new PrintWriter(file); @@ -1949,10 +1764,10 @@ public class AlchemicalWizardry // } // writer.close(); // } -// -//// +// +//// // } -// +// // Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(false); // // } catch (FileNotFoundException e) { @@ -1964,7 +1779,7 @@ public class AlchemicalWizardry // } // } // } - + @Mod.EventHandler public void initCommands(FMLServerStartingEvent event) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 78713a6a..97378d32 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/src/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -7,21 +7,22 @@ import java.util.List; import java.util.Map.Entry; import WayofTime.alchemicalWizardry.api.BlockStack; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; -import cpw.mods.fml.common.registry.GameRegistry; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLivingBase; -import net.minecraftforge.common.config.Configuration; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold; import WayofTime.alchemicalWizardry.client.renderer.RenderHelper; +import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath; import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityList; +import net.minecraft.entity.EntityLivingBase; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.config.Property; import net.minecraftforge.oredict.OreDictionary; /** @@ -194,18 +195,18 @@ public class BloodMagicConfiguration TEDemonPortal.demonPortalChance = (float)(config.get(tempDemonConfigs, "Demon Portal Chance", 0.5f).getDouble()); TEDemonPortal.demonHoardChance = (float)(config.get(tempDemonConfigs, "Demon Hoard Chance", 0.8f).getDouble()); TEDemonPortal.portalTickRate = (float)(config.get(tempDemonConfigs, "Portal Tick Rate", 0.1f).getDouble()); - + DemonVillagePath.canGoDown = config.get(tempDemonConfigs, "canRoadGoDown", true).getBoolean(); DemonVillagePath.tunnelIfObstructed = config.get(tempDemonConfigs, "tunnelIfObstructed", false).getBoolean(); DemonVillagePath.createBridgeInAirIfObstructed = config.get(tempDemonConfigs, "createBridgeInAirIfObstructed", false).getBoolean(); TEDemonPortal.limit = config.get(tempDemonConfigs, "demonGridSpaceLimit", 100).getInt(); TEDemonPortal.demonLimit = config.get(tempDemonConfigs, "demonHoardLimit", 100).getInt(); - + AlchemicalWizardry.isDemonRitualCreativeOnly = config.get(tempDemonConfigs, "IsDemonRitualCreativeOnly", false).getBoolean(); - + BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true); - + // ItemIncense.itemDuration = config.get("TestIncenseSettings", "ItemDuration", 100).getInt(); // ItemIncense.minValue = config.get("TestIncenseSettings", "MinValue", 0).getInt(); // ItemIncense.maxValue = config.get("TestIncenseSettings", "MaxValue", 100).getInt(); @@ -286,6 +287,71 @@ public class BloodMagicConfiguration config.save(); } + public static void finishLoading() + { + AlchemicalWizardry.secondTierRunes = BloodMagicConfiguration.getAltarRunesForTier("secondTier", new BlockStack[] { + new BlockStack(ModBlocks.bloodRune, 0), + new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), + new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), + new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), + new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), + new BlockStack(ModBlocks.bloodRune, 5) + }); + AlchemicalWizardry.thirdTierRunes = BloodMagicConfiguration.getAltarRunesForTier("thirdTier", new BlockStack[] { + new BlockStack(ModBlocks.bloodRune, 0), + new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), + new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), + new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), + new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), + new BlockStack(ModBlocks.bloodRune, 5) + }); + AlchemicalWizardry.fourthTierRunes = BloodMagicConfiguration.getAltarRunesForTier("fourthTier", new BlockStack[] { + new BlockStack(ModBlocks.bloodRune, 0), + new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), + new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), + new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), + new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), + new BlockStack(ModBlocks.bloodRune, 5) + }); + AlchemicalWizardry.fifthTierRunes = BloodMagicConfiguration.getAltarRunesForTier("fifthTier", new BlockStack[] { + new BlockStack(ModBlocks.bloodRune, 0), + new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), + new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), + new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), + new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), + new BlockStack(ModBlocks.bloodRune, 5) + }); + AlchemicalWizardry.sixthTierRunes = BloodMagicConfiguration.getAltarRunesForTier("sixthTier", new BlockStack[] { + new BlockStack(ModBlocks.bloodRune, 0), + new BlockStack(ModBlocks.speedRune, 0), + new BlockStack(ModBlocks.efficiencyRune, 0), + new BlockStack(ModBlocks.runeOfSacrifice, 0), + new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), + new BlockStack(ModBlocks.bloodRune, 1), + new BlockStack(ModBlocks.bloodRune, 2), + new BlockStack(ModBlocks.bloodRune, 3), + new BlockStack(ModBlocks.bloodRune, 4), + new BlockStack(ModBlocks.bloodRune, 5) + }); + config.save(); + } + public static void set(String categoryName, String propertyName, String newValue) { config.load(); @@ -365,11 +431,11 @@ public class BloodMagicConfiguration } private static void buildTeleposerBlacklist() { - + // Make sure it's empty before setting the blacklist. // Otherwise, reloading the config while in-game will duplicate the list. AlchemicalWizardryEventHooks.teleposerBlacklist.clear(); - + for (String blockSet : BloodMagicConfiguration.teleposerBlacklist) { String[] blockData = blockSet.split(":"); @@ -402,4 +468,50 @@ public class BloodMagicConfiguration // only got here if we didn't return false return true; } + + private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues) + { + String[] defaultNames = new String[defaultValues.length]; + for (int i = 0; i < defaultValues.length; i++) + { + defaultNames[i] = Block.blockRegistry.getNameForObject(defaultValues[i].getBlock()) + ":" + defaultValues[i].getMeta(); + } + Property property = config.get("rune overrides", tierName, defaultNames); + String[] names = property.getStringList(); + if (names.length != defaultNames.length) + { + property.set(defaultNames); + return defaultValues; + } + BlockStack[] blockStacks = new BlockStack[names.length]; + for (int i = 0; i < names.length; i++) + { + String[] parts = names[i].split(":"); + if (parts.length < 2 || parts.length > 3) + { + property.set(defaultNames); + return defaultValues; + } + Block block = GameRegistry.findBlock(parts[0], parts[1]); + int metadata = 0; + if (parts.length == 3) + { + try + { + metadata = Integer.parseInt(parts[2]); + } + catch (NumberFormatException exception) + { + metadata = 0; + } + } + if (block == null) + { + property.set(defaultNames); + return defaultValues; + } + blockStacks[i] = new BlockStack(block, metadata); + } + return blockStacks; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java index f3bcce2b..738944fa 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java @@ -1,30 +1,31 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.BlockStack; import WayofTime.alchemicalWizardry.api.tile.IAltarComponent; import WayofTime.alchemicalWizardry.common.block.BlockCrystal; +import WayofTime.alchemicalWizardry.common.block.BloodRune; import WayofTime.alchemicalWizardry.common.block.BloodStoneBrick; import WayofTime.alchemicalWizardry.common.block.LargeBloodStoneBrick; import net.minecraft.block.Block; import net.minecraft.block.BlockBeacon; import net.minecraft.block.BlockGlowstone; import net.minecraft.init.Blocks; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.ModBlocks; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.IFadedRune; -import WayofTime.alchemicalWizardry.common.block.BloodRune; public class UpgradedAltars { - public static List secondTierAltar = new ArrayList(); - public static List thirdTierAltar = new ArrayList(); - public static List fourthTierAltar = new ArrayList(); - public static List fifthTierAltar = new ArrayList(); - public static List sixthTierAltar = new ArrayList(); + public static List secondTierAltar = new ArrayList(); + public static List thirdTierAltar = new ArrayList(); + public static List fourthTierAltar = new ArrayList(); + public static List fifthTierAltar = new ArrayList(); + public static List sixthTierAltar = new ArrayList(); public static int highestAltar = 6; public static int isAltarValid(World world, int x, int y, int z) @@ -41,155 +42,74 @@ public class UpgradedAltars } public static boolean checkAltarIsValid(World world, int x, int y, int z, int altarTier) + { + if (altarTier == 1) + { + return true; + } + List altarComponents = getAltarUpgradeListForTier(altarTier); + if (altarComponents == null) + { + return false; + } + for (AltarComponent ac : altarComponents) + { + if (!checkAltarComponent(ac, world, x, y, z, altarTier)) + { + return false; + } + } + return true; + } + + private static BlockStack[] getRuneOverrides(int altarTier) { switch (altarTier) { - case 1: - return true; - case 2: - for (AltarComponent ac : secondTierAltar) - { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta))) - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - if (!checkSpecials(ac, new BlockStack(block, metadata))) - return false; - } - } - } - - return true; - + return AlchemicalWizardry.secondTierRunes; case 3: - for (AltarComponent ac : thirdTierAltar) - { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta))) - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - if (!checkSpecials(ac, new BlockStack(block, metadata))) - return false; - } - } - } - - return true; - + return AlchemicalWizardry.thirdTierRunes; case 4: - for (AltarComponent ac : fourthTierAltar) - { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta))) - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - if (!checkSpecials(ac, new BlockStack(block, metadata))) - return false; - } - } - } - - return true; - + return AlchemicalWizardry.fourthTierRunes; case 5: - for (AltarComponent ac : fifthTierAltar) - { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta))) - return false; - } - } else { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - if (!checkSpecials(ac, new BlockStack(block, metadata))) - return false; - } - } - } - - return true; - + return AlchemicalWizardry.fifthTierRunes; case 6: - for (AltarComponent ac : sixthTierAltar) - { - if (ac.isBloodRune()) - { - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (!(testBlock instanceof BloodRune)) - { - if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta))) - return false; - } - } else - { - Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) - { - if (!checkSpecials(ac, new BlockStack(block, metadata))) - return false; - } - } - } - - return true; - + return AlchemicalWizardry.sixthTierRunes; default: - return false; + return null; } } + private static boolean checkAltarComponent(AltarComponent altarComponent, IBlockAccess world, int x, int y, int z, int altarTier) + { + Block block = world.getBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); + int metadata = world.getBlockMetadata(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); + if (altarComponent.isBloodRune()) + { + boolean result = false; + BlockStack[] runes = getRuneOverrides(altarTier); + if (runes == null) + { + return false; + } + for (BlockStack rune : runes) + { + result |= altarComponent.isUpgradeSlot() ? + block == rune.getBlock() && metadata == rune.getMeta() : + block == altarComponent.getBlock() && metadata == altarComponent.getMetadata(); + } + return result; + } + else + { + if (((altarComponent.getBlock() != block) || (altarComponent.getMetadata() != metadata)) && !(altarComponent.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()))) + { + if (!checkSpecials(altarComponent, new BlockStack(block, metadata))) + return false; + } + } + return true; + } public static AltarUpgradeComponent getUpgrades(World world, int x, int y, int z, int altarTier) { @@ -199,86 +119,80 @@ public class UpgradedAltars } AltarUpgradeComponent upgrades = new AltarUpgradeComponent(); List list = UpgradedAltars.getAltarUpgradeListForTier(altarTier); - - for (AltarComponent ac : list) + BlockStack[] runes = getRuneOverrides(altarTier); + if (list == null || runes == null) { - if (ac.isUpgradeSlot()) + return upgrades; + } + for (AltarComponent altarComponent : list) + { + if (altarComponent.isUpgradeSlot()) { - //Currently checks the getRuneEffect. - //TODO Change so that it uses the metadata instead, with the BlockID. - Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - int meta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()); - - if (testBlock instanceof BloodRune) + Block block = world.getBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); + int metadata = world.getBlockMetadata(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ()); + BlockStack blockStack = new BlockStack(block, metadata); + switch (Arrays.asList(runes).indexOf(blockStack)) { - if (testBlock instanceof IFadedRune && altarTier > ((IFadedRune)testBlock).getAltarTierLimit(meta)) - { - return UpgradedAltars.getUpgrades(world, x, y, z, ((IFadedRune)testBlock).getAltarTierLimit(meta)); - } - - switch (((BloodRune) testBlock).getRuneEffect(meta)) - { - case 1: - upgrades.addSpeedUpgrade(); - break; + case 1: + upgrades.addSpeedUpgrade(); + break; - case 2: - upgrades.addEfficiencyUpgrade(); - break; + case 2: + upgrades.addEfficiencyUpgrade(); + break; - case 3: - upgrades.addSacrificeUpgrade(); - break; + case 3: + upgrades.addSacrificeUpgrade(); + break; - case 4: - upgrades.addSelfSacrificeUpgrade(); - break; + case 4: + upgrades.addSelfSacrificeUpgrade(); + break; - case 5: - upgrades.addaltarCapacitiveUpgrade(); - break; + case 5: + upgrades.addaltarCapacitiveUpgrade(); + break; - case 6: - upgrades.addDisplacementUpgrade(); - break; + case 6: + upgrades.addDisplacementUpgrade(); + break; - case 7: - upgrades.addorbCapacitiveUpgrade(); - break; + case 7: + upgrades.addorbCapacitiveUpgrade(); + break; - case 8: - upgrades.addBetterCapacitiveUpgrade(); - break; - - case 9: - upgrades.addAccelerationUpgrade(); - break; - } + case 8: + upgrades.addBetterCapacitiveUpgrade(); + break; + + case 9: + upgrades.addAccelerationUpgrade(); + break; } } } - return upgrades; } public static void loadAltars() { - secondTierAltar.add(new AltarComponent(-1, -1, -1, ModBlocks.bloodRune, 0, true, false)); - secondTierAltar.add(new AltarComponent(0, -1, -1, ModBlocks.bloodRune, 0, true, true)); - secondTierAltar.add(new AltarComponent(1, -1, -1, ModBlocks.bloodRune, 0, true, false)); - secondTierAltar.add(new AltarComponent(-1, -1, 0, ModBlocks.bloodRune, 0, true, true)); - secondTierAltar.add(new AltarComponent(1, -1, 0, ModBlocks.bloodRune, 0, true, true)); - secondTierAltar.add(new AltarComponent(-1, -1, 1, ModBlocks.bloodRune, 0, true, false)); - secondTierAltar.add(new AltarComponent(0, -1, 1, ModBlocks.bloodRune, 0, true, true)); - secondTierAltar.add(new AltarComponent(1, -1, 1, ModBlocks.bloodRune, 0, true, false)); - thirdTierAltar.add(new AltarComponent(-1, -1, -1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(0, -1, -1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(1, -1, -1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(-1, -1, 0, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(1, -1, 0, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(-1, -1, 1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(0, -1, 1, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(1, -1, 1, ModBlocks.bloodRune, 0, true, true)); + secondTierAltar.add(new AltarComponent(-1, -1, -1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, false)); + secondTierAltar.add(new AltarComponent(0, -1, -1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + secondTierAltar.add(new AltarComponent(1, -1, -1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, false)); + secondTierAltar.add(new AltarComponent(-1, -1, 0, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + secondTierAltar.add(new AltarComponent(1, -1, 0, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + secondTierAltar.add(new AltarComponent(-1, -1, 1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, false)); + secondTierAltar.add(new AltarComponent(0, -1, 1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + secondTierAltar.add(new AltarComponent(1, -1, 1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, false)); + + thirdTierAltar.add(new AltarComponent(-1, -1, -1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(0, -1, -1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(1, -1, -1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(-1, -1, 0, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(1, -1, 0, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(-1, -1, 1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(0, -1, 1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(1, -1, 1, AlchemicalWizardry.secondTierRunes[0].getBlock(), AlchemicalWizardry.secondTierRunes[0].getMeta(), true, true)); thirdTierAltar.add(new AltarComponent(-3, -1, -3, Blocks.stonebrick, 0, false, false)); thirdTierAltar.add(new AltarComponent(-3, 0, -3, Blocks.stonebrick, 0, false, false)); thirdTierAltar.add(new AltarComponent(3, -1, -3, Blocks.stonebrick, 0, false, false)); @@ -294,22 +208,21 @@ public class UpgradedAltars for (int i = -2; i <= 2; i++) { - thirdTierAltar.add(new AltarComponent(3, -2, i, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(-3, -2, i, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(i, -2, 3, ModBlocks.bloodRune, 0, true, true)); - thirdTierAltar.add(new AltarComponent(i, -2, -3, ModBlocks.bloodRune, 0, true, true)); + thirdTierAltar.add(new AltarComponent(3, -2, i, AlchemicalWizardry.thirdTierRunes[0].getBlock(), AlchemicalWizardry.thirdTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(-3, -2, i, AlchemicalWizardry.thirdTierRunes[0].getBlock(), AlchemicalWizardry.thirdTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(i, -2, 3, AlchemicalWizardry.thirdTierRunes[0].getBlock(), AlchemicalWizardry.thirdTierRunes[0].getMeta(), true, true)); + thirdTierAltar.add(new AltarComponent(i, -2, -3, AlchemicalWizardry.thirdTierRunes[0].getBlock(), AlchemicalWizardry.thirdTierRunes[0].getMeta(), true, true)); } fourthTierAltar.addAll(thirdTierAltar); for (int i = -3; i <= 3; i++) { - fourthTierAltar.add(new AltarComponent(5, -3, i, ModBlocks.bloodRune, 0, true, true)); - fourthTierAltar.add(new AltarComponent(-5, -3, i, ModBlocks.bloodRune, 0, true, true)); - fourthTierAltar.add(new AltarComponent(i, -3, 5, ModBlocks.bloodRune, 0, true, true)); - fourthTierAltar.add(new AltarComponent(i, -3, -5, ModBlocks.bloodRune, 0, true, true)); + fourthTierAltar.add(new AltarComponent(5, -3, i, AlchemicalWizardry.fourthTierRunes[0].getBlock(), AlchemicalWizardry.fourthTierRunes[0].getMeta(), true, true)); + fourthTierAltar.add(new AltarComponent(-5, -3, i, AlchemicalWizardry.fourthTierRunes[0].getBlock(), AlchemicalWizardry.fourthTierRunes[0].getMeta(), true, true)); + fourthTierAltar.add(new AltarComponent(i, -3, 5, AlchemicalWizardry.fourthTierRunes[0].getBlock(), AlchemicalWizardry.fourthTierRunes[0].getMeta(), true, true)); + fourthTierAltar.add(new AltarComponent(i, -3, -5, AlchemicalWizardry.fourthTierRunes[0].getBlock(), AlchemicalWizardry.fourthTierRunes[0].getMeta(), true, true)); } - for (int i = -2; i <= 1; i++) { fourthTierAltar.add(new AltarComponent(5, i, 5, Blocks.stonebrick, 0, false, false)); @@ -317,46 +230,42 @@ public class UpgradedAltars fourthTierAltar.add(new AltarComponent(-5, i, -5, Blocks.stonebrick, 0, false, false)); fourthTierAltar.add(new AltarComponent(-5, i, 5, Blocks.stonebrick, 0, false, false)); } - fourthTierAltar.add(new AltarComponent(5, 2, 5, ModBlocks.largeBloodStoneBrick, 0, false, false)); fourthTierAltar.add(new AltarComponent(5, 2, -5, ModBlocks.largeBloodStoneBrick, 0, false, false)); fourthTierAltar.add(new AltarComponent(-5, 2, -5, ModBlocks.largeBloodStoneBrick, 0, false, false)); fourthTierAltar.add(new AltarComponent(-5, 2, 5, ModBlocks.largeBloodStoneBrick, 0, false, false)); + fifthTierAltar.addAll(fourthTierAltar); fifthTierAltar.add(new AltarComponent(-8, -3, 8, Blocks.beacon, 0, false, false)); fifthTierAltar.add(new AltarComponent(-8, -3, -8, Blocks.beacon, 0, false, false)); fifthTierAltar.add(new AltarComponent(8, -3, -8, Blocks.beacon, 0, false, false)); fifthTierAltar.add(new AltarComponent(8, -3, 8, Blocks.beacon, 0, false, false)); - for (int i = -6; i <= 6; i++) { - fifthTierAltar.add(new AltarComponent(8, -4, i, ModBlocks.bloodRune, 0, true, true)); - fifthTierAltar.add(new AltarComponent(-8, -4, i, ModBlocks.bloodRune, 0, true, true)); - fifthTierAltar.add(new AltarComponent(i, -4, 8, ModBlocks.bloodRune, 0, true, true)); - fifthTierAltar.add(new AltarComponent(i, -4, -8, ModBlocks.bloodRune, 0, true, true)); + fifthTierAltar.add(new AltarComponent(8, -4, i, AlchemicalWizardry.fifthTierRunes[0].getBlock(), AlchemicalWizardry.fifthTierRunes[0].getMeta(), true, true)); + fifthTierAltar.add(new AltarComponent(-8, -4, i, AlchemicalWizardry.fifthTierRunes[0].getBlock(), AlchemicalWizardry.fifthTierRunes[0].getMeta(), true, true)); + fifthTierAltar.add(new AltarComponent(i, -4, 8, AlchemicalWizardry.fifthTierRunes[0].getBlock(), AlchemicalWizardry.fifthTierRunes[0].getMeta(), true, true)); + fifthTierAltar.add(new AltarComponent(i, -4, -8, AlchemicalWizardry.fifthTierRunes[0].getBlock(), AlchemicalWizardry.fifthTierRunes[0].getMeta(), true, true)); } - + sixthTierAltar.addAll(fifthTierAltar); - - for(int i = -4; i <= 2; i++) + for (int i = -4; i <= 2; i++) { sixthTierAltar.add(new AltarComponent(11, i, 11, Blocks.stonebrick, 0, false, false)); sixthTierAltar.add(new AltarComponent(-11, i, -11, Blocks.stonebrick, 0, false, false)); sixthTierAltar.add(new AltarComponent(11, i, -11, Blocks.stonebrick, 0, false, false)); sixthTierAltar.add(new AltarComponent(-11, i, 11, Blocks.stonebrick, 0, false, false)); } - sixthTierAltar.add(new AltarComponent(11, 3, 11, ModBlocks.blockCrystal, 0, false, false)); sixthTierAltar.add(new AltarComponent(-11, 3, -11, ModBlocks.blockCrystal, 0, false, false)); sixthTierAltar.add(new AltarComponent(11, 3, -11, ModBlocks.blockCrystal, 0, false, false)); sixthTierAltar.add(new AltarComponent(-11, 3, 11, ModBlocks.blockCrystal, 0, false, false)); - for (int i = -9; i <= 9; i++) { - sixthTierAltar.add(new AltarComponent(11, -5, i, ModBlocks.bloodRune, 0, true, true)); - sixthTierAltar.add(new AltarComponent(-11, -5, i, ModBlocks.bloodRune, 0, true, true)); - sixthTierAltar.add(new AltarComponent(i, -5, 11, ModBlocks.bloodRune, 0, true, true)); - sixthTierAltar.add(new AltarComponent(i, -5, -11, ModBlocks.bloodRune, 0, true, true)); + sixthTierAltar.add(new AltarComponent(11, -5, i, AlchemicalWizardry.sixthTierRunes[0].getBlock(), AlchemicalWizardry.sixthTierRunes[0].getMeta(), true, true)); + sixthTierAltar.add(new AltarComponent(-11, -5, i, AlchemicalWizardry.sixthTierRunes[0].getBlock(), AlchemicalWizardry.sixthTierRunes[0].getMeta(), true, true)); + sixthTierAltar.add(new AltarComponent(i, -5, 11, AlchemicalWizardry.sixthTierRunes[0].getBlock(), AlchemicalWizardry.sixthTierRunes[0].getMeta(), true, true)); + sixthTierAltar.add(new AltarComponent(i, -5, -11, AlchemicalWizardry.sixthTierRunes[0].getBlock(), AlchemicalWizardry.sixthTierRunes[0].getMeta(), true, true)); } } @@ -417,7 +326,7 @@ public class UpgradedAltars case 5: return fifthTierAltar; - + case 6: return sixthTierAltar; }