diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/1.7.2/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index c9da2243..62f88d07 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -4,7 +4,6 @@ import java.io.File; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -23,27 +22,16 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.oredict.OreDictionary; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryFuelHandler; -import WayofTime.alchemicalWizardry.common.AlchemicalWizardryTickHandler; import WayofTime.alchemicalWizardry.common.CommonProxy; import WayofTime.alchemicalWizardry.common.EntityAirElemental; import WayofTime.alchemicalWizardry.common.LifeBucketHandler; import WayofTime.alchemicalWizardry.common.LifeEssence; import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent; import WayofTime.alchemicalWizardry.common.NewPacketHandler; -import WayofTime.alchemicalWizardry.common.PacketHandler; -import WayofTime.alchemicalWizardry.common.PotionBoost; -import WayofTime.alchemicalWizardry.common.PotionDrowning; -import WayofTime.alchemicalWizardry.common.PotionFlameCloak; -import WayofTime.alchemicalWizardry.common.PotionFlight; -import WayofTime.alchemicalWizardry.common.PotionIceCloak; -import WayofTime.alchemicalWizardry.common.PotionInhibit; -import WayofTime.alchemicalWizardry.common.PotionProjectileProtect; -import WayofTime.alchemicalWizardry.common.PotionReciprocation; import WayofTime.alchemicalWizardry.common.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.common.altarRecipeRegistry.AltarRecipeRegistry; import WayofTime.alchemicalWizardry.common.block.ArmourForge; -import WayofTime.alchemicalWizardry.common.block.LifeEssenceBlock; import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars; import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon; import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist; @@ -58,16 +46,18 @@ 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.items.ItemBloodRuneBlock; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; -import WayofTime.alchemicalWizardry.common.items.ItemSpellEffectBlock; -import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock; -import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock; -import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.items.LifeBucket; -import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; -import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; +import WayofTime.alchemicalWizardry.common.potion.PotionBoost; +import WayofTime.alchemicalWizardry.common.potion.PotionDrowning; +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.PotionProjectileProtect; +import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; import WayofTime.alchemicalWizardry.common.rituals.Rituals; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; import WayofTime.alchemicalWizardry.common.spell.simple.SpellEarthBender; @@ -97,7 +87,6 @@ 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 cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; @@ -109,8 +98,6 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; @Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v0.8.0") //@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {"BloodAltar", "particle", "SetLifeEssence", "GetLifeEssence", "Ritual", "GetAltarEssence", "TESocket", "TEWritingTable", "CustomParticle", "SetPlayerVel", "SetPlayerPos", "TEPedestal", "TEPlinth", "TETeleposer", "InfiniteLPPath", "TEOrientor"}, packetHandler = PacketHandler.class) @@ -135,6 +122,8 @@ public class AlchemicalWizardry public static Potion customPotionReciprocation; public static Potion customPotionFlameCloak; public static Potion customPotionIceCloak; + public static Potion customPotionHeavyHeart; + public static Potion customPotionFireFuse; public static int customPotionDrowningID; public static int customPotionBoostID; @@ -144,6 +133,8 @@ public class AlchemicalWizardry public static int customPotionReciprocationID; public static int customPotionFlameCloakID; public static int customPotionIceCloakID; + public static int customPotionHeavyHeartID; + public static int customPotionFireFuseID; public static boolean isThaumcraftLoaded; public static boolean isForestryLoaded; @@ -438,7 +429,10 @@ public class AlchemicalWizardry customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation"); customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID,false,0).setIconIndex(0,0).setPotionName("Flame Cloak")); customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID,false,0).setIconIndex(0,0).setPotionName("Ice Cloak")); - + customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID,true,0).setIconIndex(0, 0).setPotionName("Heavy Heart")); + customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID,true,0).setIconIndex(0, 0).setPotionName("Fire Fuse")); + + //FluidStack lifeEssenceFluidStack = new FluidStack(lifeEssenceFluid, 1); //LiquidStack lifeEssence = new LiquidStack(lifeEssenceFlowing, 1); //LiquidDictionary.getOrCreateLiquid("Life Essence", lifeEssence); diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/1.7.2/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 59b4e98a..88184381 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -46,6 +46,8 @@ public class BloodMagicConfiguration AlchemicalWizardry.customPotionReciprocationID = config.get("Potion ID", "Reciprocation", 105).getInt(); AlchemicalWizardry.customPotionFlameCloakID = config.get("Potion ID","FlameCloak",106).getInt(); AlchemicalWizardry.customPotionIceCloakID = config.get("Potion ID","IceCloak",107).getInt(); + AlchemicalWizardry.customPotionHeavyHeartID = config.get("Potion ID","HeavyHeart",108).getInt(); + AlchemicalWizardry.customPotionFireFuseID = config.get("Potion ID","FireFuse",109).getInt(); MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt(); AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true); diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/ModBlocks.java b/1.7.2/java/WayofTime/alchemicalWizardry/ModBlocks.java index 18cf8810..19a2a061 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/ModBlocks.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/ModBlocks.java @@ -90,10 +90,6 @@ public class ModBlocks GameRegistry.registerBlock(ModBlocks.blockAltar, "Altar"); GameRegistry.registerBlock(ModBlocks.bloodRune, ItemBloodRuneBlock.class, "AlchemicalWizardry" + (ModBlocks.bloodRune.getUnlocalizedName().substring(5))); GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence"); - GameRegistry.registerBlock(ModBlocks.blockSpellParadigm, ItemSpellParadigmBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellParadigm.getUnlocalizedName())); - GameRegistry.registerBlock(ModBlocks.blockSpellEnhancement, ItemSpellEnhancementBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellEnhancement.getUnlocalizedName())); - GameRegistry.registerBlock(ModBlocks.blockSpellModifier, ItemSpellModifierBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellModifier.getUnlocalizedName())); - GameRegistry.registerBlock(ModBlocks.blockSpellEffect, ItemSpellEffectBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellEffect.getUnlocalizedName())); GameRegistry.registerBlock(ModBlocks.speedRune, "speedRune"); GameRegistry.registerBlock(ModBlocks.efficiencyRune, "efficiencyRune"); GameRegistry.registerBlock(ModBlocks.runeOfSacrifice, "runeOfSacrifice"); @@ -114,7 +110,13 @@ public class ModBlocks GameRegistry.registerBlock(ModBlocks.blockTeleposer, "blockTeleposer"); GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock"); GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight"); + GameRegistry.registerBlock(ModBlocks.blockConduit,"blockConduit"); + GameRegistry.registerBlock(ModBlocks.blockSpellParadigm, ItemSpellParadigmBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellParadigm.getUnlocalizedName())); + GameRegistry.registerBlock(ModBlocks.blockSpellEnhancement, ItemSpellEnhancementBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellEnhancement.getUnlocalizedName())); + GameRegistry.registerBlock(ModBlocks.blockSpellModifier, ItemSpellModifierBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellModifier.getUnlocalizedName())); + GameRegistry.registerBlock(ModBlocks.blockSpellEffect, ItemSpellEffectBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellEffect.getUnlocalizedName())); + } public static void registerBlocksInInit() diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/ModItems.java b/1.7.2/java/WayofTime/alchemicalWizardry/ModItems.java index f5c8bd83..ba96f5d8 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/ModItems.java @@ -1,13 +1,72 @@ package WayofTime.alchemicalWizardry; -import cpw.mods.fml.common.event.FMLEvent; -import cpw.mods.fml.common.registry.GameRegistry; -import WayofTime.alchemicalWizardry.common.items.*; -import WayofTime.alchemicalWizardry.common.items.potion.*; -import WayofTime.alchemicalWizardry.common.items.sigil.*; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; +import WayofTime.alchemicalWizardry.common.items.AWBaseItems; +import WayofTime.alchemicalWizardry.common.items.ActivationCrystal; +import WayofTime.alchemicalWizardry.common.items.AirScribeTool; +import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb; +import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb; +import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor; +import WayofTime.alchemicalWizardry.common.items.BlankSpell; +import WayofTime.alchemicalWizardry.common.items.BloodShard; +import WayofTime.alchemicalWizardry.common.items.BoundArmour; +import WayofTime.alchemicalWizardry.common.items.BoundAxe; +import WayofTime.alchemicalWizardry.common.items.BoundPickaxe; +import WayofTime.alchemicalWizardry.common.items.BoundShovel; +import WayofTime.alchemicalWizardry.common.items.CheatyItem; +import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice; +import WayofTime.alchemicalWizardry.common.items.DemonPlacer; +import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus; +import WayofTime.alchemicalWizardry.common.items.DuskScribeTool; +import WayofTime.alchemicalWizardry.common.items.EarthScribeTool; +import WayofTime.alchemicalWizardry.common.items.EnergyBattery; +import WayofTime.alchemicalWizardry.common.items.EnergyBazooka; +import WayofTime.alchemicalWizardry.common.items.EnergyBlast; +import WayofTime.alchemicalWizardry.common.items.EnergySword; +import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus; +import WayofTime.alchemicalWizardry.common.items.FireScribeTool; +import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal; +import WayofTime.alchemicalWizardry.common.items.ItemComponents; +import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey; +import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; +import WayofTime.alchemicalWizardry.common.items.LavaCrystal; +import WayofTime.alchemicalWizardry.common.items.LifeBucket; +import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb; +import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb; +import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus; +import WayofTime.alchemicalWizardry.common.items.SacrificialDagger; +import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; +import WayofTime.alchemicalWizardry.common.items.WaterScribeTool; +import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; +import WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent; +import WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst; +import WayofTime.alchemicalWizardry.common.items.potion.AveragePowerCatalyst; +import WayofTime.alchemicalWizardry.common.items.potion.EnhancedFillingAgent; +import WayofTime.alchemicalWizardry.common.items.potion.GreaterLengtheningCatalyst; +import WayofTime.alchemicalWizardry.common.items.potion.GreaterPowerCatalyst; +import WayofTime.alchemicalWizardry.common.items.potion.MundaneLengtheningCatalyst; +import WayofTime.alchemicalWizardry.common.items.potion.MundanePowerCatalyst; +import WayofTime.alchemicalWizardry.common.items.potion.StandardBindingAgent; +import WayofTime.alchemicalWizardry.common.items.potion.StandardFillingAgent; +import WayofTime.alchemicalWizardry.common.items.potion.WeakBindingAgent; +import WayofTime.alchemicalWizardry.common.items.potion.WeakFillingAgent; +import WayofTime.alchemicalWizardry.common.items.sigil.AirSigil; +import WayofTime.alchemicalWizardry.common.items.sigil.DivinationSigil; +import WayofTime.alchemicalWizardry.common.items.sigil.ItemBloodLightSigil; +import WayofTime.alchemicalWizardry.common.items.sigil.LavaSigil; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfElementalAffinity; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfGrowth; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHaste; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfMagnetism; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheBridge; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheFastMiner; +import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfWind; +import WayofTime.alchemicalWizardry.common.items.sigil.VoidSigil; +import WayofTime.alchemicalWizardry.common.items.sigil.WaterSigil; +import cpw.mods.fml.common.registry.GameRegistry; /** * Created with IntelliJ IDEA. @@ -84,6 +143,8 @@ public class ModItems public static Item armourInhibitor; public static Item creativeFiller; public static Item demonPlacer; + + public static Item baseItems; public static Item weakFillingAgent; public static Item standardFillingAgent; @@ -182,6 +243,7 @@ public class ModItems itemBloodLightSigil = new ItemBloodLightSigil().setUnlocalizedName("bloodLightSigil"); itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal"); bucketLife = (new LifeBucket(ModBlocks.blockLifeEssence)).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); + baseItems = new ItemComponents().setUnlocalizedName("baseItems"); } public static void registerItems() @@ -269,6 +331,8 @@ public class ModItems GameRegistry.registerItem(ModItems.itemBloodLightSigil, "itemBloodLightSigil"); GameRegistry.registerItem(ModItems.itemComplexSpellCrystal, "itemComplexSpellCrystal"); GameRegistry.registerItem(ModItems.bucketLife, "bucketLife"); + + GameRegistry.registerItem(ModItems.baseItems, "bloodMagicBaseItems"); //GameRegistry.registerItem(ModItems.itemBloodFrame, "itemBloodFrame"); } } diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 52a8e8a4..040af219 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -42,6 +42,11 @@ public class AlchemicalWizardryEventHooks { int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier(); event.entityLiving.motionY += (0.1f) * (2 + i); + } + + if(event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart)) + { + event.entityLiving.motionY = 0; } } @@ -298,6 +303,32 @@ public class AlchemicalWizardryEventHooks } } } - } + } + + if(entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart)) + { + entityLiving.worldObj.spawnParticle("flame", x+SpellHelper.gaussian(1),y-1.3+SpellHelper.gaussian(0.3),z+SpellHelper.gaussian(1), 0, 0.06d, 0); + + int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier(); + double decrease = 0.025*(i+1); + + if(entityLiving.motionY>-0.5) + { + entityLiving.motionY-=decrease; + } + } + + if(entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse)) + { + entityLiving.worldObj.spawnParticle("flame", x+SpellHelper.gaussian(1),y-1.3+SpellHelper.gaussian(0.3),z+SpellHelper.gaussian(1), 0, 0.06d, 0); + + int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getAmplifier(); + int radius = r+1; + + if(entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getDuration()<=2) + { + entityLiving.worldObj.createExplosion(null, x, y, z, radius, false); + } + } } } diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/altarRecipeRegistry/AltarRecipeRegistry.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/altarRecipeRegistry/AltarRecipeRegistry.java index 88ef593b..2808aa54 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/altarRecipeRegistry/AltarRecipeRegistry.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/altarRecipeRegistry/AltarRecipeRegistry.java @@ -78,7 +78,7 @@ public class AltarRecipeRegistry { if(recipe.doesRequiredItemMatch(testItem, currentTierAltar)) { - return recipe.getResult(); + return ItemStack.copyItemStack(recipe.getResult()); } } diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java index c8b6524e..3af40dc7 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java @@ -142,8 +142,8 @@ public class BoundAxe extends ItemAxe implements IBindable Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); int posX = (int)(blockVec.xCoord); - int posY = (int)(blockVec.xCoord); - int posZ = (int)(blockVec.xCoord); + int posY = (int)(blockVec.yCoord); + int posZ = (int)(blockVec.zCoord); boolean silkTouch = false; int so = Enchantment.silkTouch.effectId; int fortune = Enchantment.fortune.effectId; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java index a0026c38..6d3f82f3 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java @@ -139,8 +139,8 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); int posX = (int)(blockVec.xCoord); - int posY = (int)(blockVec.xCoord); - int posZ = (int)(blockVec.xCoord); + int posY = (int)(blockVec.yCoord); + int posZ = (int)(blockVec.zCoord); boolean silkTouch = false; int so = Enchantment.silkTouch.effectId; int fortune = Enchantment.fortune.effectId; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java index 1aba8e0f..7c03848e 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java @@ -143,8 +143,8 @@ public class BoundShovel extends ItemSpade implements IBindable Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer); int posX = (int)(blockVec.xCoord); - int posY = (int)(blockVec.xCoord); - int posZ = (int)(blockVec.xCoord); + int posY = (int)(blockVec.yCoord); + int posZ = (int)(blockVec.zCoord); boolean silkTouch = false; int so = Enchantment.silkTouch.effectId; int fortune = Enchantment.fortune.effectId; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java new file mode 100644 index 00000000..51b1e7d2 --- /dev/null +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/items/ItemComponents.java @@ -0,0 +1,80 @@ +package WayofTime.alchemicalWizardry.common.items; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +import org.lwjgl.input.Keyboard; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemComponents extends Item +{ + private static final String[] ITEM_NAMES = new String[]{"QuartzRod"}; + + @SideOnly(Side.CLIENT) + private IIcon[] icons; + + public ItemComponents() + { + super(); + this.maxStackSize = 1; + this.setCreativeTab(AlchemicalWizardry.tabBloodMagic); + this.hasSubtypes = true; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + icons = new IIcon[ITEM_NAMES.length]; + + for (int i = 0; i < ITEM_NAMES.length; ++i) + { + icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseItem" + ITEM_NAMES[i]); + } + } + + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + return par1ItemStack; + } + + @Override + public String getUnlocalizedName(ItemStack itemStack) + { + //This is what will do all the localisation things on the alchemy components so you dont have to set it :D + int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1); + return ("" + "item.bloodMagicBaseItem." + ITEM_NAMES[meta]); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) + { + int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1); + return icons[j]; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item id, CreativeTabs creativeTab, List list) + { + for (int meta = 0; meta < ITEM_NAMES.length; ++meta) + { + list.add(new ItemStack(id, 1, meta)); + } + } +} diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionBoost.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java similarity index 86% rename from 1.7.2/java/WayofTime/alchemicalWizardry/common/PotionBoost.java rename to 1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java index ce4de5f2..132205bb 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionBoost.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionBoost.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common; +package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionDrowning.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java similarity index 86% rename from 1.7.2/java/WayofTime/alchemicalWizardry/common/PotionDrowning.java rename to 1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java index 26efc6af..87558f26 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionDrowning.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionDrowning.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common; +package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java new file mode 100644 index 00000000..8fe5d527 --- /dev/null +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFireFuse.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionFireFuse extends Potion +{ + public PotionFireFuse(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionFlameCloak.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java similarity index 86% rename from 1.7.2/java/WayofTime/alchemicalWizardry/common/PotionFlameCloak.java rename to 1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java index e25a7c06..b885d240 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionFlameCloak.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFlameCloak.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common; +package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionFlight.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java similarity index 86% rename from 1.7.2/java/WayofTime/alchemicalWizardry/common/PotionFlight.java rename to 1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java index 9b7940d0..23e93e57 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionFlight.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionFlight.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common; +package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java new file mode 100644 index 00000000..952fb59c --- /dev/null +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionHeavyHeart.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionHeavyHeart extends Potion +{ + public PotionHeavyHeart(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionIceCloak.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java similarity index 86% rename from 1.7.2/java/WayofTime/alchemicalWizardry/common/PotionIceCloak.java rename to 1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java index 18eba799..d169b4d9 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionIceCloak.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionIceCloak.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common; +package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionInhibit.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java similarity index 86% rename from 1.7.2/java/WayofTime/alchemicalWizardry/common/PotionInhibit.java rename to 1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java index 0014b9c3..2214e105 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionInhibit.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionInhibit.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common; +package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionProjectileProtect.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java similarity index 86% rename from 1.7.2/java/WayofTime/alchemicalWizardry/common/PotionProjectileProtect.java rename to 1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java index b3c70c6b..317edd54 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionProjectileProtect.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionProjectileProtect.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common; +package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionReciprocation.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java similarity index 86% rename from 1.7.2/java/WayofTime/alchemicalWizardry/common/PotionReciprocation.java rename to 1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java index 2f105b23..ddceed0b 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/PotionReciprocation.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/potion/PotionReciprocation.java @@ -1,4 +1,4 @@ -package WayofTime.alchemicalWizardry.common; +package WayofTime.alchemicalWizardry.common.potion; import net.minecraft.potion.Potion; diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java index 76d1a176..a25da6d7 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/renderer/block/itemRender/TESpellEnhancementBlockItemRenderer.java @@ -95,13 +95,20 @@ public class TESpellEnhancementBlockItemRenderer implements IItemRenderer } public String getResourceLocationForMeta(int meta) - { + { switch(meta) { case 0: return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png"; case 1: return "alchemicalwizardry:textures/models/SpellEnhancementPower2.png"; case 2: return "alchemicalwizardry:textures/models/SpellEnhancementPower3.png"; + case 5: return "alchemicalwizardry:textures/models/SpellEnhancementCost1.png"; + case 6: return "alchemicalwizardry:textures/models/SpellEnhancementCost2.png"; + case 7: return "alchemicalwizardry:textures/models/SpellEnhancementCost3.png"; + case 10: return "alchemicalwizardry:textures/models/SpellEnhancementPotency1.png"; + case 11: return "alchemicalwizardry:textures/models/SpellEnhancementPotency2.png"; + case 12: return "alchemicalwizardry:textures/models/SpellEnhancementPotency3.png"; + } return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png"; - } + } } diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java index 4af98379..f1b410ef 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/EntitySpellProjectile.java @@ -552,7 +552,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile { for(IProjectileImpactEffect impactEffect : impactList) { - impactEffect.onEntityImpact(mop); + impactEffect.onEntityImpact(mop, this); } } } diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectEarth.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectEarth.java index fe71038c..c168d34b 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectEarth.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectEarth.java @@ -3,36 +3,36 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefaultEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefaultEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefensiveEarth; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileEnvironmentalEarth; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileOffensiveEarth; public class SpellEffectEarth extends SpellEffect { @Override public void defaultModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - + parad.addImpactEffect(new ProjectileDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } @Override public void offensiveModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - + parad.addImpactEffect(new ProjectileOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } @Override public void defensiveModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - + parad.addImpactEffect(new ProjectileDefensiveEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); } @Override public void environmentalModificationProjectile(SpellParadigmProjectile parad) { parad.addUpdateEffect(new ProjectileEnvironmentalEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); - } @Override @@ -66,8 +66,7 @@ public class SpellEffectEarth extends SpellEffect @Override public void defaultModificationMelee(SpellParadigmMelee parad) { - // TODO Auto-generated method stub - + parad.addWorldEffect(new MeleeDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement)); } @Override @@ -94,28 +93,26 @@ public class SpellEffectEarth extends SpellEffect @Override protected int getCostForDefaultProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)(10*Math.pow((0.5*(this.powerEnhancement)+1)*2 + 1,3)*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForOffenseProjectile() { - // TODO Auto-generated method stub - return 0; + + return (int)(3*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForDefenseProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)(3*Math.pow((this.powerEnhancement*2+1),2)*(this.potencyEnhancement*2+1)*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForEnvironmentProjectile() { - return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement)); + return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement)*Math.pow(0.8, costEnhancement)); } @Override diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java index 65fe51f7..4800871f 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectFire.java @@ -4,6 +4,9 @@ import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefaultFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefensiveFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileEnvironmentalFire; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileOffensiveFire; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefaultFire; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefensiveFire; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfEnvironmentalFire; @@ -21,25 +24,19 @@ public class SpellEffectFire extends SpellEffect @Override public void offensiveModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); - parad.damage+=this.potencyEnhancement; + parad.addImpactEffect(new ProjectileOffensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); } @Override public void defensiveModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); - parad.damage+=this.potencyEnhancement; + parad.addImpactEffect(new ProjectileDefensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); } @Override public void environmentalModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); - parad.damage+=this.potencyEnhancement; + parad.addUpdateEffect(new ProjectileEnvironmentalFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); } @Override @@ -97,48 +94,43 @@ public class SpellEffectFire extends SpellEffect @Override protected int getCostForDefaultProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)((5*Math.pow(1.5*this.powerEnhancement+1, 2)*(1.5*this.potencyEnhancement+1)+this.potencyEnhancement*15)*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForOffenseProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)(10*Math.pow((this.powerEnhancement)*1.3+1,2)*((1.5*this.potencyEnhancement+1))*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForDefenseProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)(25*Math.pow(1*this.powerEnhancement+1,2)*(1*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForEnvironmentProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)(75*(0.5*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForDefaultSelf() { - return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement)); + return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement)*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForOffenseSelf() { - return 500*(int)((this.powerEnhancement+1)*Math.pow(2, potencyEnhancement)); + return 500*(int)((this.powerEnhancement+1)*Math.pow(2, potencyEnhancement)*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForDefenseSelf() { - // TODO Auto-generated method stub - return 0; + return (int)(25*(3*this.potencyEnhancement+1)*(2*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement)); } @Override @@ -174,5 +166,4 @@ public class SpellEffectFire extends SpellEffect // TODO Auto-generated method stub return 0; } - } diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectWind.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectWind.java index de3ca561..0edb3596 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectWind.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellEffectWind.java @@ -3,36 +3,34 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileDefaultWind; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileEnvironmentalWind; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileOffensiveWind; public class SpellEffectWind extends SpellEffect { @Override public void defaultModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - + parad.addImpactEffect(new ProjectileDefaultWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); } @Override public void offensiveModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - + parad.addImpactEffect(new ProjectileOffensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); } @Override public void defensiveModificationProjectile(SpellParadigmProjectile parad) { - // TODO Auto-generated method stub - + parad.ricochetMax+=this.potencyEnhancement; } @Override public void environmentalModificationProjectile(SpellParadigmProjectile parad) { parad.addUpdateEffect(new ProjectileEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement)); - } @Override @@ -94,15 +92,13 @@ public class SpellEffectWind extends SpellEffect @Override protected int getCostForDefaultProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)(100*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement)); } @Override protected int getCostForOffenseProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)(100*(0.5*this.potencyEnhancement+1)*(this.powerEnhancement+1)*Math.pow(0.8, costEnhancement)); } @Override @@ -115,8 +111,7 @@ public class SpellEffectWind extends SpellEffect @Override protected int getCostForEnvironmentProjectile() { - // TODO Auto-generated method stub - return 0; + return (int)(50*(this.powerEnhancement+1)*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement)); } @Override diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java index ec812f42..d10a6494 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java @@ -3,8 +3,8 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect; import java.util.List; import java.util.Random; -import WayofTime.alchemicalWizardry.common.NewPacketHandler; import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -15,8 +15,8 @@ import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraft.world.WorldProvider; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.common.NewPacketHandler; public class SpellHelper { @@ -193,4 +193,37 @@ public class SpellHelper NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getVelSettingPacket(motionX, motionY, motionZ), (EntityPlayerMP) player); } } + + public static void smashBlock(World world, int posX, int posY, int posZ) + { + Block block = world.getBlock(posX, posY, posZ); + + if(block==Blocks.stone) + { + world.setBlock(posX, posY, posZ, Blocks.cobblestone); + } + else if(block==Blocks.cobblestone) + { + world.setBlock(posX, posY, posZ, Blocks.gravel); + } + else if(block==Blocks.gravel) + { + world.setBlock(posX, posY, posZ, Blocks.sand); + } + } + + public static boolean isBlockFluid(Block block) + { + return block instanceof BlockLiquid; + } + + public static void evaporateWaterBlock(World world, int posX, int posY, int posZ) + { + Block block = world.getBlock(posX, posY, posZ); + + if(block == Blocks.water || block == Blocks.flowing_water) + { + world.setBlockToAir(posX, posY, posZ); + } + } } diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileImpactEffect.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileImpactEffect.java index 2f2cbf92..4f8cda7b 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileImpactEffect.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/IProjectileImpactEffect.java @@ -6,6 +6,6 @@ import net.minecraft.world.World; public interface IProjectileImpactEffect { - public void onEntityImpact(Entity mop); + public void onEntityImpact(Entity mop, Entity projectile); public void onTileImpact(World world, MovingObjectPosition mop); } diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/MeleeSpellCenteredWorldEffect.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/MeleeSpellCenteredWorldEffect.java new file mode 100644 index 00000000..1ab9f89c --- /dev/null +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/MeleeSpellCenteredWorldEffect.java @@ -0,0 +1,34 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffect +{ + protected float range; + + public MeleeSpellCenteredWorldEffect(int power, int potency, int cost) + { + super(power, potency, cost); + range = 0; + } + + @Override + public void onWorldEffect(World world, EntityPlayer entityPlayer) + { + Vec3 lookVec = entityPlayer.getLook(range); + int x = (int)(entityPlayer.posX + lookVec.xCoord); + int y = (int)(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord); + int z = (int)(entityPlayer.posZ + lookVec.zCoord); + + this.onCenteredWorldEffect(world, x, y, z); + } + + public void setRange(float range) + { + this.range = range; + } + + public abstract void onCenteredWorldEffect(World world, int posX, int posY, int posZ); +} diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java new file mode 100644 index 00000000..bed566cc --- /dev/null +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/MeleeDefaultEarth.java @@ -0,0 +1,38 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; + +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityFallingBlock; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect; + +public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect +{ + public MeleeDefaultEarth(int power, int potency, int cost) + { + super(power, potency, cost); + this.setRange(2); + } + + @Override + public void onCenteredWorldEffect(World world, int posX, int posY, int posZ) + { + for(int i=-3; i<=3; i++) + { + for(int j=-3; j<=3; j++) + { + for(int k=-3; k<=3; k++) + { + if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k)==null) + { + Block block = world.getBlock(posX + i, posY + j, posZ + k); + int meta = world.getBlockMetadata(posX + i, posY + j, posZ + k); + + EntityFallingBlock entity = new EntityFallingBlock(world, posX + i + 0.5f, posY + j + 0.5f, posZ + k + 0.5f, block, meta); + world.spawnEntityInWorld(entity); + } + } + } + } + + } +} diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java new file mode 100644 index 00000000..e0ff5554 --- /dev/null +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefaultEarth.java @@ -0,0 +1,58 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.fluids.BlockFluidBase; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect; + +public class ProjectileDefaultEarth extends ProjectileImpactEffect +{ + public ProjectileDefaultEarth(int power, int potency, int cost) + { + super(power, potency, cost); + } + + @Override + public void onEntityImpact(Entity mop, Entity proj) + { + // TODO Auto-generated method stub + + } + + @Override + public void onTileImpact(World world, MovingObjectPosition mop) + { + int horizRange = (int)(0.5*(this.powerUpgrades)+1); + int vertRange = (int)(0.5*(this.powerUpgrades)+1); + + int posX = mop.blockX; + int posY = mop.blockY; + int posZ = mop.blockZ; + + for(int i=-horizRange; i<=horizRange; i++) + { + for(int j=-vertRange; j<=vertRange; j++) + { + for(int k=-horizRange; k<=horizRange; k++) + { + if(!world.isAirBlock(posX+i, posY+j, posZ+k)) + { + Block block = world.getBlock(posX+i, posY+j, posZ+k); + if(block == null || block.getBlockHardness(world, posX+i, posY+j, posZ+k)==-1 || SpellHelper.isBlockFluid(block)) + { + continue; + } + //block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k)); + //world.destroyBlock(posX+i, posY+j, posZ+k, true); + world.func_147480_a(posX+i, posY+j, posZ+k, false); + } + } + } + } + + } + +} diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java new file mode 100644 index 00000000..530e9e97 --- /dev/null +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileDefensiveEarth.java @@ -0,0 +1,66 @@ +package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; + +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileUpdateEffect; + +public class ProjectileDefensiveEarth extends ProjectileImpactEffect +{ + public ProjectileDefensiveEarth(int power, int potency, int cost) + { + super(power, potency, cost); + } + + @Override + public void onEntityImpact(Entity mop, Entity proj) + { + // TODO Auto-generated method stub + } + + @Override + public void onTileImpact(World world, MovingObjectPosition mop) + { + int horizRange = (int)(this.powerUpgrades); + int vertRange = (int)(this.potencyUpgrades); + + int posX = mop.blockX; + int posY = mop.blockY; + int posZ = mop.blockZ; + + for(int i=-horizRange; i<=horizRange; i++) + { + for(int j=-vertRange; j<=vertRange; j++) + { + for(int k=-horizRange; k<=horizRange; k++) + { + if(!world.isAirBlock(posX+i, posY+j, posZ+k)) + { + Block block = world.getBlock(posX+i, posY+j, posZ+k); + if(block == null || block.getBlockHardness(world, posX+i, posY+j, posZ+k)==-1) + { + continue; + } + //block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k)); + //world.destroyBlock(posX+i, posY+j, posZ+k, true); + if(world.rand.nextFloat()<0.6f) + { + SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k); + } + } + } + } + } + + } + +} diff --git a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java index da958d8b..09ee4efe 100644 --- a/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java +++ b/1.7.2/java/WayofTime/alchemicalWizardry/common/spell/complex/effect/impactEffects/earth/ProjectileEnvironmentalEarth.java @@ -52,7 +52,7 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect if(!worldObj.isAirBlock(posX+i, posY+j, posZ+k)&&blocksBroken