Updating 1.7.2 repo

This commit is contained in:
WayofTime 2014-04-05 16:00:08 -04:00
parent c9a38c4c10
commit 9dc8a57a2d
76 changed files with 1789 additions and 184 deletions

View file

@ -100,7 +100,7 @@ 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.0.0Beta")
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.0.0b")
//@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)
public class AlchemicalWizardry
@ -261,6 +261,7 @@ public class AlchemicalWizardry
proxy.registerEntities();
proxy.registerEntityTrackers();
//ItemStacks used for crafting go here
ItemStack lapisStack = new ItemStack(Items.dye,1,4);
ItemStack lavaBucketStack = new ItemStack(Items.lava_bucket);
ItemStack cobblestoneStack = new ItemStack(Blocks.cobblestone);
ItemStack glassStack = new ItemStack(Blocks.glass, 1, craftingConstant);
@ -438,6 +439,7 @@ public class AlchemicalWizardry
customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID,true,0).setIconIndex(0, 0).setPotionName("Fire Fuse"));
customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID,true,0).setIconIndex(0,0).setPotionName("Planar Binding"));
ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb);
//FluidStack lifeEssenceFluidStack = new FluidStack(lifeEssenceFluid, 1);
//LiquidStack lifeEssence = new LiquidStack(lifeEssenceFlowing, 1);
@ -448,7 +450,7 @@ public class AlchemicalWizardry
FluidContainerRegistry.registerFluidContainer(lifeEssenceFluid, new ItemStack(ModItems.bucketLife), FluidContainerRegistry.EMPTY_BUCKET);
//lifeEssenceFluid.setUnlocalizedName("lifeEssence");
//LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Life Essence", LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(AlchemicalWizardry.bucketLife), new ItemStack(Item.bucketEmpty)));
//LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Life Essence", LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(AlchemicalWizardry.bucketLife), new ItemStack(Items.bucketEmpty)));
//GameRegistry.registerBlock(testingBlock, "testingBlock");
//LanguageRegistry.addName(testingBlock, "Testing Block");
//(testingBlock, "pickaxe", 0);
@ -513,11 +515,27 @@ public class AlchemicalWizardry
// comp[i] = redstoneStack;
// }
// AlchemyRecipeRegistry.registerRecipe(glowstoneDustStack, 2, comp, 2);
ItemStack gunpowderStack = new ItemStack(Items.gunpowder);
ItemStack offensaStack = new ItemStack(ModItems.baseAlchemyItems,1,0);
ItemStack praesidiumStack = new ItemStack(ModItems.baseAlchemyItems,1,1);
ItemStack orbisTerraeStack = new ItemStack(ModItems.baseAlchemyItems,1,2);
ItemStack strengthenedCatalystStack = new ItemStack(ModItems.baseAlchemyItems,1,3);
ItemStack concentratedCatalystStack = new ItemStack(ModItems.baseAlchemyItems,1,4);
ItemStack fracturedBoneStack = new ItemStack(ModItems.baseAlchemyItems,1,5);
ItemStack virtusStack = new ItemStack(ModItems.baseAlchemyItems,1,6);
ItemStack reductusStack = new ItemStack(ModItems.baseAlchemyItems,1,7);
ItemStack potentiaStack = new ItemStack(ModItems.baseAlchemyItems,1,8);
ItemStack strengthenedCatalystStackCrafted = new ItemStack(ModItems.baseAlchemyItems,2,3);
ItemStack fracturedBoneStackCrafted = new ItemStack(ModItems.baseAlchemyItems,4,5);
//TODO NEW RECIPES!
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakBindingAgent), 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.clay_ball)}, 2);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.standardBindingAgent), 15, new ItemStack[]{new ItemStack(ModItems.weakBindingAgent), sanctusStack, new ItemStack(ModItems.crystallos)}, 3);
AlchemyRecipeRegistry.registerRecipe(simpleCatalystStack, 2, new ItemStack[]{sugarStack, redstoneStack, redstoneStack, glowstoneDustStack, new ItemStack(Items.gunpowder)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.incendium), 5, new ItemStack[]{lavaBucketStack, new ItemStack(Items.blaze_powder), new ItemStack(Items.blaze_powder), new ItemStack(Blocks.netherrack), simpleCatalystStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.incendium), 5, new ItemStack[]{lavaBucketStack, new ItemStack(Items.blaze_powder), new ItemStack(Items.blaze_powder), new ItemStack(Blocks.netherrack), simpleCatalystStack}, 2);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.aether), 5, new ItemStack[]{featherStack, featherStack, glowstoneDustStack, ghastTearStack, simpleCatalystStack}, 2);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.sanctus), 5, new ItemStack[]{glowstoneDustStack, new ItemStack(Items.gold_nugget), glowstoneDustStack, glassStack, simpleCatalystStack}, 2);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.crepitous), 5, new ItemStack[]{new ItemStack(Items.gunpowder), new ItemStack(Items.gunpowder), cobblestoneStack, cobblestoneStack, simpleCatalystStack}, 2);
@ -537,6 +555,21 @@ public class AlchemicalWizardry
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.enhancedFillingAgent), 25, new ItemStack[]{new ItemStack(ModItems.standardFillingAgent), new ItemStack(ModItems.aquasalus), new ItemStack(ModItems.magicales)}, 4);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.activationCrystal, 1, 1), 100, new ItemStack[]{new ItemStack(ModItems.activationCrystal, 1, 0), new ItemStack(ModItems.demonBloodShard), incendiumStack, aquasalusStack, aetherStack}, 4);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.activationCrystal, 1, 1), 100, new ItemStack[]{new ItemStack(ModItems.activationCrystal, 1, 0), new ItemStack(Items.nether_star), incendiumStack, aquasalusStack, aetherStack}, 4);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.web),2,new ItemStack[]{new ItemStack(Items.string),new ItemStack(Items.string),new ItemStack(Items.string),new ItemStack(Items.string),new ItemStack(Items.string)},1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.gunpowder,2,0), 2, new ItemStack[]{gunpowderStack, new ItemStack(Items.coal), new ItemStack(Blocks.sand)}, 1);
AlchemyRecipeRegistry.registerRecipe(strengthenedCatalystStackCrafted, 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.dye,1,15), new ItemStack(Items.nether_wart)}, 3);
AlchemyRecipeRegistry.registerRecipe(offensaStack,10, new ItemStack[]{strengthenedCatalystStack,incendiumStack, new ItemStack(Items.arrow), new ItemStack(Items.flint), new ItemStack(Items.arrow)},3);
AlchemyRecipeRegistry.registerRecipe(praesidiumStack, 10, new ItemStack[]{strengthenedCatalystStack,tennebraeStack,ironIngotStack,new ItemStack(Blocks.web),redstoneStack}, 3);
AlchemyRecipeRegistry.registerRecipe(orbisTerraeStack, 10, new ItemStack[]{strengthenedCatalystStack,terraeStack, gunpowderStack, new ItemStack(Blocks.netherrack), new ItemStack(Blocks.sand)}, 3);
AlchemyRecipeRegistry.registerRecipe(concentratedCatalystStack,10,new ItemStack[]{strengthenedCatalystStack,fracturedBoneStack,goldNuggetStack},4);
AlchemyRecipeRegistry.registerRecipe(fracturedBoneStackCrafted, 2, new ItemStack[]{new ItemStack(Items.bone), new ItemStack(Items.bone),new ItemStack(Items.bone),new ItemStack(Items.bone), gunpowderStack},1);
AlchemyRecipeRegistry.registerRecipe(virtusStack,20, new ItemStack[]{redstoneStack, new ItemStack(Items.coal),strengthenedCatalystStack,redstoneStack,gunpowderStack}, 3);
AlchemyRecipeRegistry.registerRecipe(reductusStack,20,new ItemStack[]{redstoneStack, goldIngotStack, strengthenedCatalystStack,new ItemStack(Blocks.soul_sand), new ItemStack(Items.carrot)},3);
AlchemyRecipeRegistry.registerRecipe(potentiaStack,20, new ItemStack[]{glowstoneDustStack,strengthenedCatalystStack,lapisStack,lapisStack,new ItemStack(Items.quartz)}, 3);
HomSpellRegistry.registerBasicSpell(new ItemStack(Items.flint_and_steel), new SpellFireBurst());
HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.ice), new SpellFrozenWater());
HomSpellRegistry.registerBasicSpell(new ItemStack(Blocks.tnt), new SpellExplosions());
@ -591,6 +624,7 @@ public class AlchemicalWizardry
MeteorRegistry.registerMeteorParadigm(new ItemStack(Items.nether_star), this.netherStarMeteorArray, this.netherStarMeteorRadius);
//Register spell component recipes
ItemStack complexSpellCrystalStack = new ItemStack(ModItems.itemComplexSpellCrystal);
ItemStack quartzRodStack = new ItemStack(ModItems.baseItems,1,0);
ItemStack emptyCoreStack = new ItemStack(ModItems.baseItems,1,1);
ItemStack magicalesCableStack = new ItemStack(ModItems.baseItems,1,2);
@ -606,18 +640,32 @@ public class AlchemicalWizardry
ItemStack windCoreStack = new ItemStack(ModItems.baseItems,1,12);
ItemStack earthCoreStack = new ItemStack(ModItems.baseItems,1,13);
ItemStack inputCableStack = new ItemStack(ModItems.baseItems,1,14);
ItemStack crackedRunicPlateStack = new ItemStack(ModItems.baseItems,1,15);
ItemStack runicPlateStack = new ItemStack(ModItems.baseItems,1,16);
ItemStack imbuedRunicPlateStack = new ItemStack(ModItems.baseItems,1,17);
ItemStack defaultCoreStack = new ItemStack(ModItems.baseItems,1,18);
ItemStack offenseCoreStack = new ItemStack(ModItems.baseItems,1,19);
ItemStack defensiveCoreStack = new ItemStack(ModItems.baseItems,1,20);
ItemStack environmentalCoreStack = new ItemStack(ModItems.baseItems,1,21);
ItemStack powerCoreStack = new ItemStack(ModItems.baseItems,1,22);
ItemStack costCoreStack = new ItemStack(ModItems.baseItems,1,23);
ItemStack potencyCoreStack = new ItemStack(ModItems.baseItems,1,24);
ItemStack obsidianBraceStack = new ItemStack(ModItems.baseItems,1,25);
ItemStack magicalesCraftedCableStack = new ItemStack(ModItems.baseItems,5,2);
ItemStack crackedRunicPlateStackCrafted = new ItemStack(ModItems.baseItems,2,15);
ItemStack runicPlateStackCrafted = new ItemStack(ModItems.baseItems,2,16);
GameRegistry.addRecipe(quartzRodStack, "qqq", 'q', new ItemStack(Items.quartz));
GameRegistry.addRecipe(emptyCoreStack,"gig","nrn","gig",'n',goldIngotStack,'i',ironIngotStack,'g',glassStack,'r',simpleCatalystStack);
GameRegistry.addRecipe(magicalesCraftedCableStack,"sss","mmm","sss",'s',new ItemStack(Items.string),'m',magicalesStack);
GameRegistry.addRecipe(woodBraceStack," il","ili","li ",'l', new ItemStack(Blocks.log,1,craftingConstant),'i',new ItemStack(Items.string));
GameRegistry.addRecipe(stoneBraceStack," is","isi","si ",'i', ironIngotStack,'s',reinforcedSlateStack);
GameRegistry.addRecipe(obsidianBraceStack," is","ibi","si ",'i', obsidianStack,'s',reinforcedSlateStack,'b',stoneBraceStack);
GameRegistry.addRecipe(projectileCoreStack, "mbm","aca","mom",'c', emptyCoreStack,'b',weakBloodShardStack,'m', magicalesStack,'o', magicianBloodOrbStack,'a',new ItemStack(Items.arrow));
GameRegistry.addRecipe(selfCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',sanctusStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',glowstoneDustStack);
GameRegistry.addRecipe(meleeCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',incendiumStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',new ItemStack(Items.flint_and_steel));
GameRegistry.addRecipe(meleeCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',incendiumStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',new ItemStack(Items.fire_charge));
GameRegistry.addRecipe(paradigmBackPlateStack,"isi","rgr","isi",'i',ironIngotStack,'r',stoneStack,'g',goldIngotStack,'s',reinforcedSlateStack);
GameRegistry.addRecipe(outputCableStack, " si","s c"," si",'s',stoneStack,'i',ironIngotStack,'c',simpleCatalystStack);
@ -628,6 +676,20 @@ public class AlchemicalWizardry
GameRegistry.addRecipe(inputCableStack, "ws ","rcs","ws ",'w',blankSlateStack,'s',stoneStack,'r',imbuedSlateStack,'c',simpleCatalystStack);
GameRegistry.addRecipe(defaultCoreStack,"msm","geg","mom",'m', strengthenedCatalystStack,'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack);
GameRegistry.addRecipe(offenseCoreStack,"msm","geg","mom",'m', offensaStack,'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack);
GameRegistry.addRecipe(defensiveCoreStack,"msm","geg","mom",'m', praesidiumStack,'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack);
GameRegistry.addRecipe(environmentalCoreStack,"msm","geg","mom",'m', orbisTerraeStack,'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack);
GameRegistry.addRecipe(powerCoreStack,"msm","geg","mom",'m', virtusStack,'e', emptyCoreStack, 'o', masterBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack);
GameRegistry.addRecipe(costCoreStack,"msm","geg","mom",'m', reductusStack,'e', emptyCoreStack, 'o', masterBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack);
GameRegistry.addRecipe(potencyCoreStack,"msm","geg","mom",'m', potentiaStack,'e', emptyCoreStack, 'o', masterBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack);
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);
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);
@ -638,6 +700,38 @@ public class AlchemicalWizardry
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,1),"bgb","ico","bgb",'c',iceCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,2),"bgb","ico","bgb",'c',windCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,3),"bgb","ico","bgb",'c',earthCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier,1,0),"bgb","ico","bgb",'c',defaultCoreStack,'i',inputCableStack,'o',outputCableStack,'b',stoneBraceStack,'g',ironIngotStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier,1,1),"bgb","ico","bgb",'c',offenseCoreStack,'i',inputCableStack,'o',outputCableStack,'b',stoneBraceStack,'g',ironIngotStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier,1,2),"bgb","ico","bgb",'c',defensiveCoreStack,'i',inputCableStack,'o',outputCableStack,'b',stoneBraceStack,'g',ironIngotStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier,1,3),"bgb","ico","bgb",'c',environmentalCoreStack,'i',inputCableStack,'o',outputCableStack,'b',stoneBraceStack,'g',ironIngotStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,0),"bpb","ico","bpb",'c', powerCoreStack,'b',woodBraceStack,'p',crackedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,1),"bpb","ico","bpb",'c', powerCoreStack,'b',stoneBraceStack,'p',runicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,2),"bpb","ico","bpb",'c', powerCoreStack,'b',obsidianBraceStack,'p',imbuedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,5),"bpb","ico","bpb",'c', costCoreStack,'b',woodBraceStack,'p',crackedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,6),"bpb","ico","bpb",'c', costCoreStack,'b',stoneBraceStack,'p',runicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,7),"bpb","ico","bpb",'c', costCoreStack,'b',obsidianBraceStack,'p',imbuedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,10),"bpb","ico","bpb",'c', potencyCoreStack,'b',woodBraceStack,'p',crackedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,11),"bpb","ico","bpb",'c', potencyCoreStack,'b',stoneBraceStack,'p',runicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,12),"bpb","ico","bpb",'c', potencyCoreStack,'b',obsidianBraceStack,'p',imbuedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
GameRegistry.addShapelessRecipe(new ItemStack(Items.dye,5,15),fracturedBoneStack);
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);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.bread), 1, new ItemStack[]{new ItemStack(Items.wheat),new ItemStack(Items.sugar)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.fire_charge,5,0), 3, new ItemStack[]{new ItemStack(Items.coal),new ItemStack(Items.blaze_powder),gunpowderStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.sand,2,0), 1, new ItemStack[]{new ItemStack(Blocks.cobblestone),gunpowderStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.clay,4,0), 2, new ItemStack[]{new ItemStack(Blocks.hardened_clay,1,craftingConstant),new ItemStack(Blocks.hardened_clay,1,craftingConstant),new ItemStack(Blocks.hardened_clay,1,craftingConstant),new ItemStack(Blocks.hardened_clay,1,craftingConstant),waterBucketStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.string,4,0), 1, new ItemStack[]{new ItemStack(Blocks.wool,1,craftingConstant),new ItemStack(Items.flint)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.gravel,2,0), 1, new ItemStack[]{new ItemStack(Blocks.stone),gunpowderStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.obsidian), 1, new ItemStack[]{waterBucketStack,lavaBucketStack}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.paper), 1, new ItemStack[]{new ItemStack(Items.reeds)}, 1);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.soul_sand,3,0), 3, new ItemStack[]{new ItemStack(Blocks.sand),new ItemStack(Blocks.sand),new ItemStack(Blocks.sand),waterBucketStack,weakBloodShardStack}, 3);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.mycelium,1,0), 5, new ItemStack[]{new ItemStack(Blocks.grass),new ItemStack(Blocks.brown_mushroom), new ItemStack(Blocks.red_mushroom)}, 2);
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.ice), 2, new ItemStack[]{waterBucketStack,new ItemStack(Items.snowball)}, 1);
}
@EventHandler

View file

@ -32,7 +32,7 @@ public class LifeBucketHandler
if (block!=null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0)
{
world.setBlock(pos.blockX, pos.blockY, pos.blockZ, block);
world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ);
return new ItemStack(ModItems.bucketLife);
} else
{

View file

@ -17,6 +17,7 @@ public class AlchemicalPotionCreationHandler
addPotion(new ItemStack(Items.ghast_tear), Potion.regeneration.id, 450);
addPotion(new ItemStack(Items.golden_carrot), Potion.nightVision.id, 2 * 60 * 20);
addPotion(new ItemStack(Items.magma_cream), Potion.fireResistance.id, 2 * 60 * 20);
addPotion(new ItemStack(Items.water_bucket), Potion.waterBreathing.id, 2 * 60 * 20);
addPotion(new ItemStack(Items.sugar), Potion.moveSpeed.id, 2 * 60 * 20);
addPotion(new ItemStack(Items.speckled_melon), Potion.heal.id, 2 * 60 * 20);
addPotion(new ItemStack(Items.spider_eye), Potion.poison.id, 450);
@ -35,6 +36,7 @@ public class AlchemicalPotionCreationHandler
addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20);
addPotion(new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20);
addPotion(new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20);
addPotion(new ItemStack(Items.ender_pearl),AlchemicalWizardry.customPotionPlanarBinding.id,1*60*20);
}
public static void addPotion(ItemStack itemStack, int potionID, int tickDuration)

View file

@ -60,9 +60,10 @@ public class EnergyItems extends Item implements IBindable
//player.setEntityHealth((player.getHealth()-1));
player.setHealth((player.getHealth() - 1));
if (player.getHealth() <= 0)
if (player.getHealth() <= 0.0005)
{
player.inventory.dropAllItems();
break;
}
}
}
@ -217,9 +218,10 @@ public class EnergyItems extends Item implements IBindable
//player.setEntityHealth((player.getHealth()-1));
user.setHealth((user.getHealth() - 1));
if (user.getHealth() <= 0.1f)
if (user.getHealth() <= 0.0005f)
{
user.onDeath(DamageSource.generic);
}
}
} else if (energySyphoned >= 100)
@ -231,9 +233,10 @@ public class EnergyItems extends Item implements IBindable
//player.setEntityHealth((player.getHealth()-1));
user.setHealth((user.getHealth() - 1));
if (user.getHealth() <= 0.1f)
if (user.getHealth() <= 0.0005f)
{
user.onDeath(DamageSource.generic);
break;
}
}
}

View file

@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemAlchemyBase extends Item
{
private static final String[] ITEM_NAMES = new String[]{};
private static final String[] ITEM_NAMES = new String[]{"Offensa","Praesidium","OrbisTerrae","StrengthenedCatalyst","ConcentratedCatalyst","FracturedBone","Virtus","Reductus","Potentia"};
@SideOnly(Side.CLIENT)
private IIcon[] icons;

View file

@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemComponents extends Item
{
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore","MeleeCore","ParadigmBackPlate","OutputCable","FlameCore","IcyCore","GustCore","EarthenCore","InputCable","CrackedRunicPlate","RunicPlate","ScribedRunicPlate","DefaultCore","OffensiveCore","DefensiveCore","EnvironmentalCore"};
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore","MeleeCore","ParadigmBackPlate","OutputCable","FlameCore","IcyCore","GustCore","EarthenCore","InputCable","CrackedRunicPlate","RunicPlate","ScribedRunicPlate","DefaultCore","OffensiveCore","DefensiveCore","EnvironmentalCore","PowerCore","CostCore","PotencyCore","ObsidianBrace"};
@SideOnly(Side.CLIENT)
private IIcon[] icons;

View file

@ -228,7 +228,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
{
if (!p_150919_1_.isRemote)
{
p_150919_0_.stackSize--;
}
return true;
}
@ -246,7 +246,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
igrowable.func_149853_b(p_150919_1_, p_150919_1_.rand, p_150919_2_, p_150919_3_, p_150919_4_);
}
--p_150919_0_.stackSize;
}
return true;

View file

@ -37,6 +37,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
private int ticksInAir = 0;
private int ricochetCounter = 0;
private boolean scheduledForDeath = false;
private boolean isSilkTouch = false;
//Custom variables
private int maxRicochet = 0;
@ -316,6 +317,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
par1NBTTagCompound.setTag("Effects", effectList);
par1NBTTagCompound.setInteger("blocksBroken", blocksBroken);
par1NBTTagCompound.setBoolean("isSilkTouch", isSilkTouch);
}
/**
@ -331,6 +333,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
inData = par1NBTTagCompound.getByte("inData") & 255;
inGround = par1NBTTagCompound.getByte("inGround") == 1;
blocksBroken = par1NBTTagCompound.getInteger("blocksBroken");
isSilkTouch = par1NBTTagCompound.getBoolean("isSilkTouch");
NBTTagList tagList = par1NBTTagCompound.getTagList("Effects",Constants.NBT.TAG_COMPOUND);
@ -608,4 +611,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile
{
this.blocksBroken = blocksBroken;
}
public boolean getIsSilkTouch()
{
return this.isSilkTouch;
}
public void setIsSilkTouch(boolean bool)
{
this.isSilkTouch = bool;
}
}

View file

@ -23,6 +23,7 @@ public class SpellParadigmProjectile extends SpellParadigm
public List<IProjectileUpdateEffect> updateEffectList;
public boolean penetration;
public int ricochetMax;
public boolean isSilkTouch;
public SpellParadigmProjectile()
{
@ -33,6 +34,7 @@ public class SpellParadigmProjectile extends SpellParadigm
this.updateEffectList = new ArrayList();
this.penetration = false;
this.ricochetMax = 0;
this.isSilkTouch = false;
}
@Override
@ -71,6 +73,7 @@ public class SpellParadigmProjectile extends SpellParadigm
proj.setUpdateEffectList(updateEffectList);
proj.setPenetration(penetration);
proj.setRicochetMax(ricochetMax);
proj.setIsSilkTouch(isSilkTouch);
proj.setSpellEffectList(bufferedEffectList);
}

View file

@ -93,74 +93,73 @@ public class SpellEffectEarth extends SpellEffect
@Override
protected int getCostForDefaultProjectile()
{
return (int)(10*Math.pow((0.5*(this.powerEnhancement)+1)*2 + 1,3)*Math.pow(0.8, costEnhancement));
return (int)(10*Math.pow((0.5*(this.powerEnhancement)+1)*2 + 1,3)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
return (int)(10*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.8, costEnhancement));
return (int)(10*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseProjectile()
{
return (int)(3*Math.pow((this.powerEnhancement*2+1),2)*(this.potencyEnhancement*2+1)*Math.pow(0.8, costEnhancement));
return (int)(3*Math.pow((this.powerEnhancement*2+1),2)*(this.potencyEnhancement*2+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForEnvironmentProjectile()
{
return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefaultSelf()
{
return (int)(20*Math.pow(1.5*powerEnhancement+1,2)*(2*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(20*Math.pow(1.5*powerEnhancement+1,2)*(2*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseSelf()
{
return (int)(10*Math.pow(2*this.powerEnhancement+1,2)*(this.potencyEnhancement+1));
return (int)(10*Math.pow(2*this.powerEnhancement+1,2)*(this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseSelf()
{
return (int)(750*(1.1*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(750*(1.1*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForEnvironmentSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(250*(1.2*this.potencyEnhancement+1)*(3*this.powerEnhancement+2.5)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefaultMelee()
{
return (int)(50*Math.pow(1.5*this.potencyEnhancement + 1,3)*(0.5*this.powerEnhancement + 1)*Math.pow(0.8, costEnhancement));
return (int)(50*Math.pow(1.5*this.potencyEnhancement + 1,3)*(0.5*this.powerEnhancement + 1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseMelee()
{
return (int)(20*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1));
return (int)(20*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseMelee()
{
return (int)(5*(1.2*this.powerEnhancement+1)*(1.0f/3.0f*Math.pow(this.potencyEnhancement,2)+2+1.0f/2.0f*this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
return (int)(5*(1.2*this.powerEnhancement+1)*(1.0f/3.0f*Math.pow(this.potencyEnhancement,2)+2+1.0f/2.0f*this.potencyEnhancement)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForEnvironmentMelee()
{
return (int)(500*Math.pow(2*this.potencyEnhancement+1, 3)*(0.25*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(500*Math.pow(2*this.potencyEnhancement+1, 3)*(0.25*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
}

View file

@ -3,6 +3,10 @@ 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.fire.MeleeDefaultFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeDefensiveFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeEnvironmentalFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeOffensiveFire;
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;
@ -66,104 +70,96 @@ public class SpellEffectFire extends SpellEffect
@Override
public void defaultModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addEntityEffect(new MeleeDefaultFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void offensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addEntityEffect(new MeleeOffensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeDefensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void environmentalModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeEnvironmentalFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
protected int getCostForDefaultProjectile()
{
return (int)((5*Math.pow(1.5*this.powerEnhancement+1, 2)*(1.5*this.potencyEnhancement+1)+this.potencyEnhancement*15)*Math.pow(0.8, costEnhancement));
return (int)((5*Math.pow(1.5*this.powerEnhancement+1, 2)*(1.5*this.potencyEnhancement+1)+this.potencyEnhancement*15)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
return (int)(10*Math.pow((this.powerEnhancement)*1.3+1,2)*((1.5*this.potencyEnhancement+1))*Math.pow(0.8, costEnhancement));
return (int)(10*Math.pow((this.powerEnhancement)*1.3+1,2)*((1.5*this.potencyEnhancement+1))*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseProjectile()
{
return (int)(25*Math.pow(1*this.powerEnhancement+1,2)*(1*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(25*Math.pow(1*this.powerEnhancement+1,2)*(1*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForEnvironmentProjectile()
{
return (int)(75*(0.5*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(75*(0.5*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefaultSelf()
{
return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseSelf()
{
return 500*(int)((this.powerEnhancement+1)*Math.pow(2, potencyEnhancement)*Math.pow(0.8, costEnhancement));
return (int)(300*(3*powerEnhancement+1)*(2*potencyEnhancement + 1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseSelf()
{
return (int)(25*(3*this.potencyEnhancement+1)*(2*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(25*(3*this.potencyEnhancement+1)*(2*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForEnvironmentSelf()
{
return (int) ((15*Math.pow(1.7, powerEnhancement)+10*Math.pow(potencyEnhancement,1.8))*Math.pow(0.8, costEnhancement));
return (int)((15*Math.pow(1.7, powerEnhancement)+10*Math.pow(potencyEnhancement,1.8))*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefaultMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(25*(1.2*this.potencyEnhancement+1)*(2.5*this.powerEnhancement+2)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(500*(1+this.potencyEnhancement)*(this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(30*(1.5*potencyEnhancement+1)*(3*powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForEnvironmentMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(25*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
}

View file

@ -3,9 +3,17 @@ 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.MeleeDefaultWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeDefensiveWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeEnvironmentalWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeOffensiveWind;
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;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfDefaultWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfDefensiveWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfEnvironmentalWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfOffensiveWind;
public class SpellEffectWind extends SpellEffect
{
@ -24,7 +32,7 @@ public class SpellEffectWind extends SpellEffect
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
parad.ricochetMax+=this.potencyEnhancement;
parad.isSilkTouch = true;
}
@Override
@ -36,137 +44,120 @@ public class SpellEffectWind extends SpellEffect
@Override
public void defaultModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfDefaultWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void offensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfOffensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfDefensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void environmentalModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defaultModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addEntityEffect(new MeleeDefaultWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void offensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addEntityEffect(new MeleeOffensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addEntityEffect(new MeleeDefensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void environmentalModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
protected int getCostForDefaultProjectile()
{
return (int)(100*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(100*(this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
return (int)(100*(0.5*this.potencyEnhancement+1)*(this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(100*(0.5*this.potencyEnhancement+1)*(this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*(this.potencyEnhancement+1));
}
@Override
protected int getCostForEnvironmentProjectile()
{
return (int)(50*(this.powerEnhancement+1)*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
return (int)(50*(this.powerEnhancement+1)*(this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefaultSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*(0.5*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(500*(0.7d*this.powerEnhancement+1)*(0.8*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForEnvironmentSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(500*(0.7d*this.powerEnhancement+1)*(0.2*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefaultMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(350*(1.0*this.potencyEnhancement+1)*(1.2*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForOffenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(250*(1.0*this.potencyEnhancement+1)*(0.7*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForDefenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(150*(1.0*this.potencyEnhancement+1)*(0.7*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
@Override
protected int getCostForEnvironmentMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*(1.0*this.potencyEnhancement+1)*(0.7*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
}
}

View file

@ -239,15 +239,17 @@ public class SpellHelper
if(oreName.contains("ore"))
{
String lowercaseOre = oreName;
lowercaseOre.toLowerCase();
String lowercaseOre = oreName.toLowerCase();
boolean isAllowed = false;
for(String str : AlchemicalWizardry.allowedCrushedOresArray)
{
if(lowercaseOre.contains(str))
{
String testStr = str.toLowerCase();
if(lowercaseOre.contains(testStr))
{
isAllowed = true;
break;
}
}

View file

@ -45,7 +45,7 @@ public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntity
{
if(hit<maxHit&&!entity.equals(entityPlayer))
{
if(this.entityEffect(world, entity))
if(this.entityEffect(world, entity, entityPlayer))
{
hit++;
}
@ -55,7 +55,7 @@ public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntity
}
}
protected abstract boolean entityEffect(World world, Entity entity);
protected abstract boolean entityEffect(World world, Entity entity, EntityPlayer player);
public void setRange(float range)
{

View file

@ -28,6 +28,11 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect
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);
if(block.getBlockHardness(world, posX + i, posY + j, posZ + k)==-1)
{
continue;
}
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);
@ -36,6 +41,5 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect
}
}
}
}
}

View file

@ -1,7 +1,5 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

View file

@ -1,5 +1,6 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;

View file

@ -4,7 +4,6 @@ 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;

View file

@ -1,7 +1,5 @@
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;
@ -52,13 +50,25 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect
if(!worldObj.isAirBlock(posX+i, posY+j, posZ+k)&&blocksBroken<maxBlocks)
{
Block block = worldObj.getBlock(posX+i, posY+j, posZ+k);
int meta = worldObj.getBlockMetadata(posX+i, posY+j, posZ+k);
if(block == null || block.getBlockHardness(worldObj, posX+i, posY+j, posZ+k)==-1 || SpellHelper.isBlockFluid(block))
{
continue;
}
if(((EntitySpellProjectile)projectile).getIsSilkTouch()&&block.canSilkHarvest(worldObj, ((EntitySpellProjectile)projectile).shootingEntity, posX+i, posY+j, posZ+k, meta))
{
ItemStack stack = new ItemStack(block,1,meta);
EntityItem itemEntity = new EntityItem(worldObj,posX+i+0.5, posY+j+0.5, posZ+k+0.5,stack);
worldObj.spawnEntityInWorld(itemEntity);
worldObj.setBlockToAir(posX+i, posY+j, posZ+k);
}else
{
worldObj.func_147480_a(posX+i, posY+j, posZ+k, true);
}
//block.breakBlock(worldObj, posX+i, posY+j, posZ+k, block.blockID, worldObj.getBlockMetadata(posX+i, posY+j, posZ+k));
//worldObj.destroyBlock(posX+i, posY+j, posZ+k, true);
worldObj.func_147480_a(posX+i, posY+j, posZ+k, true);
blocksBroken++;
}

View file

@ -1,19 +1,13 @@
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.init.Blocks;
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 ProjectileOffensiveEarth extends ProjectileImpactEffect
{

View file

@ -1,5 +1,6 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;

View file

@ -1,9 +1,13 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
@ -17,28 +21,16 @@ public class SelfEnvironmentalEarth extends SelfSpellEffect
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int horizRadius = this.powerUpgrades + 1;
int vertRadius = this.potencyUpgrades + 2;
float radius = this.powerUpgrades*2 + 1.5f;
int dur = this.powerUpgrades*5*20 + 60;
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
List<Entity> entities = SpellHelper.getEntitiesInRange(world, player.posX, player.posY, player.posZ, radius, radius);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.yCoord);
int posZ = (int)(blockVec.zCoord);
for(int i=-horizRadius; i<=horizRadius; i++)
for(Entity entity : entities)
{
for(int j=0; j<vertRadius; j++)
if(entity instanceof EntityLiving)
{
for(int k=-horizRadius; k<=horizRadius; k++)
{
// if(k==0&&i==0)
// {
// continue;
// }
BlockTeleposer.swapBlocks(world, world, posX + i, posY + j, posZ+k, posX+i, posY+j-vertRadius, posZ+k);
}
((EntityLiving) entity).addPotionEffect(new PotionEffect(Potion.weakness.id,dur,this.potencyUpgrades));
}
}
}

View file

@ -0,0 +1,30 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
public class MeleeDefaultFire extends ExtrapolatedMeleeEntityEffect
{
public MeleeDefaultFire(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3+0.3f*potency);
this.setRadius(2+0.3f*potency);
this.setMaxNumberHit(potency+1);
}
@Override
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
{
if(entity instanceof EntityLiving)
{
entity.setFire(3*this.powerUpgrades+3);
return true;
}
return false;
}
}

View file

@ -0,0 +1,49 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellWorldEffect;
public class MeleeDefensiveFire extends MeleeSpellWorldEffect
{
public MeleeDefensiveFire(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onWorldEffect(World world, EntityPlayer entityPlayer)
{
ForgeDirection look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec());
int width = this.potencyUpgrades + 1;
int length = 5*this.powerUpgrades + 3;
int xOffset = look.offsetX;
int zOffset = look.offsetZ;
Vec3 lookVec = SpellHelper.getEntityBlockVector(entityPlayer);
int xStart = (int)(lookVec.xCoord)+1*xOffset;
int zStart = (int)(lookVec.zCoord)+1*zOffset;
int yStart = (int)(lookVec.yCoord)-1;
for(int i=-width; i<=width; i++)
{
for(int j=0; j<length;j++)
{
for(int k=0;k<3;k++)
{
if(world.isAirBlock(xStart + i*(zOffset) + j*(xOffset), yStart+k, zStart + i*(xOffset) + j*(zOffset)))
{
world.setBlock(xStart + i*(zOffset) + j*(xOffset), yStart+k, zStart + i*(xOffset) + j*(zOffset), Blocks.fire);
}
}
}
}
}
}

View file

@ -0,0 +1,32 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect
{
public MeleeEnvironmentalFire(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3*power + 2);
}
@Override
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
{
int radius = this.potencyUpgrades;
for(int i=-radius; i<=radius; i++)
{
for(int j=-radius; j<=radius; j++)
{
for(int k=-radius; k<=radius; k++)
{
SpellHelper.evaporateWaterBlock(world, posX+i, posY+j, posZ+k);
}
}
}
}
}

View file

@ -0,0 +1,32 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
public class MeleeOffensiveFire extends ExtrapolatedMeleeEntityEffect
{
public MeleeOffensiveFire(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3+0.3f*potency);
this.setRadius(2+0.3f*potency);
this.setMaxNumberHit(1);
}
@Override
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
{
if(entity instanceof EntityLiving)
{
((EntityLiving)entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFireFuse.id,20*(7-this.powerUpgrades),this.potencyUpgrades));
return true;
}
return false;
}
}

View file

@ -1,19 +1,12 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Blocks;
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 ProjectileOffensiveFire extends ProjectileImpactEffect
{

View file

@ -16,6 +16,6 @@ public class SelfOffensiveFire extends SelfSpellEffect
@Override
public void onSelfUse(World world, EntityPlayer player)
{
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,200*(this.powerUpgrades+1)*(this.powerUpgrades+1),this.potencyUpgrades));
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,300*(2*this.powerUpgrades+1),this.potencyUpgrades));
}
}

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
@ -15,7 +16,7 @@ public class MeleeDefaultIce extends ExtrapolatedMeleeEntityEffect {
}
@Override
protected boolean entityEffect(World world, Entity entity)
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
{
if(entity.hurtResistantTime>0)
{

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntitySnowball;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
@ -16,8 +17,9 @@ public class MeleeEnvironmentalIce extends ExtrapolatedMeleeEntityEffect
}
@Override
protected boolean entityEffect(World world, Entity entity)
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
{
//TODO Change to an Ice Cage
for(int i=0;i<=this.powerUpgrades;i++)
{
double randX = (world.rand.nextDouble()-world.rand.nextDouble())*3;

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@ -18,7 +19,7 @@ public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect
}
@Override
protected boolean entityEffect(World world, Entity entity)
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
{
Vec3 blockVector = SpellHelper.getEntityBlockVector(entity);

View file

@ -1,6 +1,5 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.MovingObjectPosition;

View file

@ -1,11 +1,9 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
import ibxm.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.PacketHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;

View file

@ -0,0 +1,40 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
public class MeleeDefaultWind extends ExtrapolatedMeleeEntityEffect
{
public MeleeDefaultWind(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(4+2.0f*potency);
this.setRadius(4+2.0f*potency);
this.setMaxNumberHit(potency+1);
}
@Override
protected boolean entityEffect(World world, Entity entity, EntityPlayer player)
{
double wantedVel = -(0.5d+0.7d*this.powerUpgrades);
if(entity instanceof EntityLiving)
{
double dist = Math.sqrt(entity.getDistanceToEntity(player));
double xVel = wantedVel*(entity.posX - player.posX)/dist;
double yVel = wantedVel*(entity.posY - player.posY)/dist;
double zVel = wantedVel*(entity.posZ - player.posZ)/dist;
entity.motionX = xVel;
entity.motionY = yVel;
entity.motionZ = zVel;
return true;
}
return false;
}
}

View file

@ -0,0 +1,33 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
public class MeleeDefensiveWind extends ExtrapolatedMeleeEntityEffect
{
public MeleeDefensiveWind(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3+0.3f*potency);
this.setRadius(2+0.3f*potency);
this.setMaxNumberHit(potency+1);
}
@Override
protected boolean entityEffect(World world, Entity entity, EntityPlayer player)
{
double wantedVel = 0.5d+0.5d*this.powerUpgrades;
if(entity instanceof EntityLiving)
{
entity.motionY = wantedVel;
return true;
}
return false;
}
}

View file

@ -0,0 +1,36 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect
{
public MeleeEnvironmentalWind(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(5*power + 5);
}
@Override
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
{
int radius = 5*this.potencyUpgrades + 3;
List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius);
for(Entity entity : entities)
{
if(entity instanceof EntityItem)
{
((EntityItem)entity).delayBeforeCanPickup = 0;
entity.onCollideWithPlayer((EntityPlayer)player);
}
}
}
}

View file

@ -0,0 +1,40 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
public class MeleeOffensiveWind extends ExtrapolatedMeleeEntityEffect
{
public MeleeOffensiveWind(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(3+0.3f*potency);
this.setRadius(2+0.3f*potency);
this.setMaxNumberHit(potency+1);
}
@Override
protected boolean entityEffect(World world, Entity entity, EntityPlayer player)
{
double wantedVel = 1.0d+1.0d*this.powerUpgrades;
if(entity instanceof EntityLiving)
{
double dist = Math.sqrt(entity.getDistanceToEntity(player));
double xVel = wantedVel*(entity.posX - player.posX)/dist;
double yVel = wantedVel*(entity.posY - player.posY+0.5f)/dist;
double zVel = wantedVel*(entity.posZ - player.posZ)/dist;
entity.motionX = xVel;
entity.motionY = yVel;
entity.motionZ = zVel;
return true;
}
return false;
}
}

View file

@ -0,0 +1,27 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfDefaultWind extends SelfSpellEffect
{
public SelfDefaultWind(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
player.extinguish();
player.fallDistance = 0;
}
}

View file

@ -0,0 +1,39 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfDefensiveWind extends SelfSpellEffect
{
public SelfDefensiveWind(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
double radius = 1.5d*this.powerUpgrades+1.5d;
double posX = player.posX;
double posY = player.posY;
double posZ = player.posZ;
List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius);
for(Entity entity: entities)
{
if((!entity.equals(player))&&entity instanceof EntityLiving)
{
((EntityLiving)entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id,200,this.potencyUpgrades));
}
}
}
}

View file

@ -0,0 +1,45 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfEnvironmentalWind extends SelfSpellEffect
{
public SelfEnvironmentalWind(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
double radius = 1.5d*this.potencyUpgrades+1;
double posX = player.posX;
double posY = player.posY-0.7d;
double posZ = player.posZ;
double wantedVel = 0.7d+0.7d*this.powerUpgrades;
List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius);
for(Entity entity: entities)
{
if((!entity.equals(player))&&entity instanceof EntityLiving)
{
double dist = Math.sqrt(entity.getDistanceToEntity(player));
double xVel = wantedVel*(entity.posX - posX)/dist;
double yVel = wantedVel*(entity.posY - posY)/dist;
double zVel = wantedVel*(entity.posZ - posZ)/dist;
entity.motionX = xVel;
entity.motionY = yVel;
entity.motionZ = zVel;
}
}
}
}

View file

@ -0,0 +1,32 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfOffensiveWind extends SelfSpellEffect
{
public SelfOffensiveWind(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
Vec3 vec = player.getLookVec();
double wantedVelocity = 1.5 + this.powerUpgrades*0.4;
SpellHelper.setPlayerSpeedFromServer(player, vec.xCoord * wantedVelocity, vec.yCoord * wantedVelocity, vec.zCoord * wantedVelocity);
player.fallDistance = 0;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -0,0 +1,137 @@
#Block Localization
tile.bloodAltar.name=Blutaltar
tile.bloodRune.blank.name=Blutrune
tile.bloodRune.fill.name=Rune der Erweiterten Kapazität
tile.bloodRune.empty.name=Rune der Dislokation
tile.bloodRune.test.name=Rune des Gestirns
tile.speedRune.name=Geschwindigkeitsrune
tile.efficiencyRune.name=Effizienzrune
tile.runeOfSacrifice.name=Rune der Opferung
tile.runeOfSelfSacrifice.name=Rune der Selbstopferung
tile.ritualStone.name=Ritualstein
tile.blockMasterStone.name=Meister-Ritualstein
tile.bloodSocket.name=Gefüllte Fassung
tile.imperfectRitualStone.name=Unvollkommener Ritualstein
tile.armourForge.name=Seelrüstungsschmiede
tile.emptySocket.name=Leere Fassung
tile.bloodStoneBrick.name=Blutsteinziegel
tile.largeBloodStoneBrick.name=Große Blutsteinziegel
tile.blockWritingTable.name=Alchemisches Chemieset
tile.blockHomHeart.name=Zaubertisch
tile.bloodPedestal.name=Arkaner Sockel
tile.bloodPlinth.name=Arkane Plinthe
tile.bloodTeleposer.name=Teleposer
tile.blockConduit.name=Zauberleitung
tile.blockSpellParadigm.projectile.name=Partikelgenerator
tile.blockSpellParadigm.self.name=Selbstverbesserer
tile.blockSpellParadigm.melee.name=Nahrkampfaggregator
tile.blockSpellEnhancement.power1.name=Instabile Zaubersteigerung
tile.blockSpellEnhancement.power2.name=Standard-Zaubersteigerung
tile.blockSpellEnhancement.power3.name=Verstärkte Zaubersteigerung
tile.blockSpellEnhancement.power4.name=Erfüllte Zaubersteigerung
tile.blockSpellEnhancement.power5.name=Dämonische Zaubersteigerung
tile.blockSpellEnhancement.cost1.name=Instabiler Zauberdämpfer
tile.blockSpellEnhancement.cost2.name=Standard-Zauberdämpfer
tile.blockSpellEnhancement.cost3.name=Verstärkter Zauberdämpfer
tile.blockSpellEnhancement.cost4.name=Erfüllter Zauberdämpfer
tile.blockSpellEnhancement.cost5.name=Dämonischer Zauberdämpfer
tile.blockSpellEnhancement.potency1.name=Instabiler Zauberverbesserer
tile.blockSpellEnhancement.potency2.name=Standard-Zauberverbesserer
tile.blockSpellEnhancement.potency3.name=Verstärkter Zauberverbesserer
tile.blockSpellEnhancement.potency4.name=Erfüllter Zauberverbesserer
tile.blockSpellEnhancement.potency5.name=Dämonischer Zauberverbesserer
tile.blockSpellModifier.default.name=Standard-Zaubermodifikator
tile.blockSpellModifier.offensive.name=Offensiv-Zaubermodifikator
tile.blockSpellModifier.defensive.name=Defensiv-Zaubermodifikator
tile.blockSpellModifier.environmental.name=Umwelt-Zaubermodifikator
tile.blockSpellEffect.fire.name=Tiegel des Feuers
tile.blockSpellEffect.ice.name=Eismacher
tile.blockSpellEffect.wind.name=Windgenerator
tile.blockSpellEffect.earth.name=Erdformer
#Item Localization
item.weakBloodOrb.name=Schwacher Blutorb
item.apprenticeBloodOrb.name=Lehrlingsblutorb
item.magicianBloodOrb.name=Blutorb des Magiers
item.masterBloodOrb.name=Blutorb des Meisters
item.archmageBloodOrb.name=Blutorb des Erzmagiers
item.energyBlast.name=Energie-Blaster
item.energySword.name=Gebundene Klinge
item.lavaCrystal.name=Lavakristall
item.waterSigil.name=Wassersiegel
item.lavaSigil.name=Lavasiegel
item.voidSigil.name=Leerensiegel
item.blankSlate.name=Leere Tafel
item.reinforcedSlate.name=Verstärkte Tafel
item.sacrificialDagger.name=Opfermesser
item.daggerOfSacrifice.name=Dolch der Opferung
item.airSigil.name=Luftsiegel
item.sigilOfTheFastMiner.name=Siegel des Schnellen Bergbaus
item.sigilOfElementalAffinity.name=Siegel der Elementaraffinität
item.sigilOfHaste.name=Siegel der Hast
item.sigilOfHolding.name=Siegel des Haltens
item.divinationSigil.name=Wahrheitssiegel
item.waterScribeTool.name=Elementar-Gravurwerkzeug: Wasser
item.fireScribeTool.name=Elementar-Gravurwerkzeug: Feuer
item.earthScribeTool.name=Elementar-Gravurwerkzeug: Erde
item.airScribeTool.name=Elementar-Gravurwerkzeug: Luft
item.duskScribeTool.name=Elementar-Gravurwerkzeug: Dämmerung
item.activationCrystalWeak.name=Schwacher Aktivierungskristall
item.activationCrystalAwakened.name=Erweckter Aktivierungskristall
item.boundPickaxe.name=Gebundene Spitzhacke
item.boundAxe.name=Gebundene Axt
item.boundShovel.name=Gebundene Schaufel
item.boundHelmet.name=Gebundener Helm
item.boundPlate.name=Gebundene Platte
item.boundLeggings.name=Gebundener Beinschutz
item.boundBoots.name=Gebundene Stiefel
item.weakBloodShard.name=Schwache Blutscherbe
item.growthSigil.name=Siegel des Grünen Hains
item.blankSpell.name=Ungebundener Kristall
item.alchemyFlask.name=Trankfläschchen
item.standardBindingAgent.name=Standard-Bindemittel
item.mundanePowerCatalyst.name=Gewöhnlicher Energiekatalysator
item.averagePowerCatalyst.name=Durschschnittlicher Energiekatalysator
item.greaterPowerCatalyst.name=Besserer Energiekatalysator
item.mundaneLengtheningCatalyst.name=Gewöhnlicher Verlängerungskatalysator
item.averageLengtheningCatalyst.name=Durschschnittlicher Verlängerungskatalysator
item.greaterLengtheningCatalyst.name=Besserer Verlängerungskatalysator
item.incendium.name=Incendium
item.magicales.name=Magicales
item.sanctus.name=Sanctus
item.aether.name=Aether
item.simpleCatalyst.name=Einfacher Katalysator
item.crepitous.name=Crepitous
item.crystallos.name=Crystallos
item.terrae.name=Terrae
item.aquasalus.name=Aquasalus
item.tennebrae.name=Tenebrae
item.demonBloodShard.name=Dämonenblutscherbe
item.sigilOfWind.name=Siegel des Wirbelwindes
item.telepositionFocus.name=Telepositionsfokus
item.enhancedTelepositionFocus.name=Verbesserter Telepositionsfokus
item.reinforcedTelepositionFocus.name=Verstärkter Telepositionsfokus
item.demonicTelepositionFocus.name=Dämonischer Telepositionsfokus
item.imbuedSlate.name=Erfüllte Tafel
item.demonicSlate.name=Dämonische Tafel
item.sigilOfTheBridge.name=Siegel der Phantombrücke
item.armourInhibitor.name=Rüstungshemmer
item.cheatyItem.name=Orb des Testens
item.weakFillingAgent.name=Schwaches Füllmittel
item.standardFillingAgent.name=Standard-Füllmittel
item.enhancedFillingAgent.name=Verbessertes Füllmittel
item.weakBindingAgent.name=Schwaches Bindemittel
item.ritualDiviner.name=Ritualrute
item.sigilOfMagnetism.name=Siegel des Magnetismus
item.itemDiabloKey.name=Schlüssel der Bindung
item.energyBazooka.name=Energie-Bazooka
item.bloodLightSigil.name=Siegel der Blutlampe
item.itemComplexSpellCrystal.name=[WIP] Komplexer Zauberkristall
#Creative Tab
itemGroup.tabBloodMagic=Blood Magic
#Extra Strings
bm.string.consume=Verbrauch
bm.string.drain=Entzug
bm.string.tier=Stufe

View file

@ -54,7 +54,7 @@ item.weakBloodOrb.name=Weak Blood Orb
item.apprenticeBloodOrb.name=Apprentice Blood Orb
item.magicianBloodOrb.name=Magician's Blood Orb
item.masterBloodOrb.name=Master Blood Orb
item.archmageBloodOrb.name=Archamge's Blood Orb
item.archmageBloodOrb.name=Archmage's Blood Orb
item.energyBlast.name=Energy Blaster
item.energySword.name=Bound Blade
item.lavaCrystal.name=Lava Crystal
@ -105,7 +105,7 @@ item.crepitous.name=Crepitous
item.crystallos.name=Crystallos
item.terrae.name=Terrae
item.aquasalus.name=Aquasalus
item.tennebrae.name=Tennebrae
item.tennebrae.name=Tenebrae
item.demonBloodShard.name=Demon Blood Shard
item.sigilOfWind.name=Sigil of the Whirlwind
item.telepositionFocus.name=Teleposition Focus
@ -126,7 +126,48 @@ item.sigilOfMagnetism.name=Sigil of Magnetism
item.itemDiabloKey.name=Key of Binding
item.energyBazooka.name=Energy Bazooka
item.bloodLightSigil.name=Sigil of the Blood Lamp
item.itemComplexSpellCrystal.name=[WIP] Complex Spell Crystal
item.itemComplexSpellCrystal.name=Complex Spell Crystal
item.bucketLive.name=Bucket of Life
item.bloodMagicBaseItem.quartzRod.name=Quartz Rod
item.bloodMagicBaseItem.EmptyCore.name=Empty Core
item.bloodMagicBaseItem.MagicalesCable.name=Magicales Cable
item.bloodMagicBaseItem.WoodBrace.name=Wooden Brace
item.bloodMagicBaseItem.StoneBrace.name=Stone Brace
item.bloodMagicBaseItem.ProjectileCore.name=Projectile Core
item.bloodMagicBaseItem.SelfCore.name=Self Core
item.bloodMagicBaseItem.MeleeCore.name=Melee Core
item.bloodMagicBaseItem.ParadigmBackPlate.name=Paradigm Plate
item.bloodMagicBaseItem.OutputCable.name=Output Spell Cable
item.bloodMagicBaseItem.InputCable.name=Input Spell Cable
item.bloodMagicBaseItem.FlameCore.name=Fire Core
item.bloodMagicBaseItem.IcyCore.name=Icy Core
item.bloodMagicBaseItem.GustCore.name=Gusty Core
item.bloodMagicBaseItem.EarthenCore.name=Earthen Core
item.bloodMagicBaseItem.CrackedRunicPlate.name=Cracked Runic Plate
item.bloodMagicBaseItem.RunicPlate.name=Runic Plate
item.bloodMagicBaseItem.ScribedRunicPlate.name=Imbued Runic Plate
item.bloodMagicBaseItem.DefaultCore.name=Unattuned Core
item.bloodMagicBaseItem.OffensiveCore.name=Offensive Core
item.bloodMagicBaseItem.DefensiveCore.name=Defensive Core
item.bloodMagicBaseItem.EnvironmentalCore.name=Environmental Core
item.bloodMagicBaseItem.PowerCore.name=Power Core
item.bloodMagicBaseItem.CostCore.name=Reduction Core
item.bloodMagicBaseItem.PotencyCore.name=Potency Core
item.bloodMagicBaseItem.ObsidianBrace.name=Obsidian Brace
item.bloodMagicAlchemyItem.Offensa.name=Offensa
item.bloodMagicAlchemyItem.Praesidium.name=Praesidium
item.bloodMagicAlchemyItem.OrbisTerrae.name=Orbis Terrae
item.bloodMagicAlchemyItem.StrengthenedCatalyst.name=Strengthened Catalyst
item.bloodMagicAlchemyItem.ConcentratedCatalyst.name=Concentrated Catalyst
item.bloodMagicAlchemyItem.FracturedBone.name=Fractured Bone
item.bloodMagicAlchemyItem.Virtus.name=Virtus
item.bloodMagicAlchemyItem.Reductus.name=Reductus
item.bloodMagicAlchemyItem.Potentia.name=Potentia
#Creative Tab
itemGroup.tabBloodMagic=Blood Magic
itemGroup.tabBloodMagic=Blood Magic
#Extra Strings
bm.string.consume=Usage
bm.string.drain=Drain
bm.string.tier=Tier

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -27,7 +27,6 @@ import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningHelper;
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryFuelHandler;
@ -77,6 +76,7 @@ import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBiomeChanger;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectContainment;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectCrushing;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectExpulsion;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredEarth;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredKnife;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFlight;
@ -89,6 +89,7 @@ import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLeap;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectMagnetic;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSoulBound;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSummonMeteor;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSupression;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectUnbinding;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWater;
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWellOfSuffering;
@ -112,6 +113,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
@ -307,6 +309,7 @@ public class AlchemicalWizardry
public static int itemBloodFrameItemID;
public static int baseComponentsItemID;
public static int baseAlchemyComponentsItemID;
public static int itemSigilOfSupressionItemID;
public static int testingBlockBlockID;
public static int lifeEssenceFlowingBlockID;
@ -338,6 +341,7 @@ public class AlchemicalWizardry
public static int blockSpellParadigmBlockID;
public static int blockSpellModifierBlockID;
public static int blockSpellEnhancementBlockID;
public static int blockSpectralContainerBlockID;
public static void registerRenderInformation()
{
@ -686,6 +690,7 @@ public class AlchemicalWizardry
LanguageRegistry.addName(ModItems.energyBazooka, "Energy Bazooka");
LanguageRegistry.addName(ModItems.itemBloodLightSigil, "Sigil of the Blood Lamp");
LanguageRegistry.addName(ModItems.demonBloodShard, "Demon Blood Shard");
LanguageRegistry.addName(ModItems.itemSigilOfSupression, "Sigil of the Dome");
//FluidStack lifeEssenceFluidStack = new FluidStack(lifeEssenceFluid, 1);
//LiquidStack lifeEssence = new LiquidStack(lifeEssenceFlowing, 1);
//LiquidDictionary.getOrCreateLiquid("Life Essence", lifeEssence);
@ -720,6 +725,7 @@ public class AlchemicalWizardry
GameRegistry.registerTileEntity(TESpellEffectBlock.class, "containerSpellEffectBlock");
GameRegistry.registerTileEntity(TESpellModifierBlock.class, "containerSpellModifierBlock");
GameRegistry.registerTileEntity(TESpellEnhancementBlock.class, "containerSpellEnhancementBlock");
GameRegistry.registerTileEntity(TESpectralContainer.class, "containerSpectralBlock");
//
GameRegistry.registerBlock(ModBlocks.bloodRune, ItemBloodRuneBlock.class, "AlchemicalWizardry" + (ModBlocks.bloodRune.getUnlocalizedName().substring(5)));
LanguageRegistry.addName(new ItemStack(ModBlocks.bloodRune, 1, 0), "Blood Rune");
@ -1937,7 +1943,63 @@ public class AlchemicalWizardry
autoAlchemyRitual.add(new RitualComponent(2,0,-3, RitualComponent.FIRE));
autoAlchemyRitual.add(new RitualComponent(3,0,2, RitualComponent.FIRE));
autoAlchemyRitual.add(new RitualComponent(2,0,3, RitualComponent.FIRE));
ArrayList<RitualComponent> expulsionRitual = new ArrayList();
expulsionRitual.add(new RitualComponent(2,0,2, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(2,0,1, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(1,0,2, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(2,0,-2, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(2,0,-1, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(-1,0,2, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(-2,0,2, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(-2,0,1, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(1,0,-2, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(-2,0,-2, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(-2,0,-1, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(-1,0,-2, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(4,0,2, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(5,0,2, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(4,0,-2, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(5,0,-2, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(-4,0,2, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(-5,0,2, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(-4,0,-2, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(-5,0,-2, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(2,0,4, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(2,0,5, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(-2,0,4, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(-2,0,5, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(2,0,-4, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(2,0,-5, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(-2,0,-4, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(-2,0,-5, RitualComponent.AIR));
expulsionRitual.add(new RitualComponent(0,0,6, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(0,0,-6, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(6,0,0, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(-6,0,0, RitualComponent.EARTH));
expulsionRitual.add(new RitualComponent(-5,0,0, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(-6,0,1, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(-6,0,-1, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(5,0,0, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(6,0,1, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(6,0,-1, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(0,0,5, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(1,0,6, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(-1,0,6, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(0,0,-5, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(1,0,-6, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(-1,0,-6, RitualComponent.DUSK));
expulsionRitual.add(new RitualComponent(4,0,4, RitualComponent.FIRE));
expulsionRitual.add(new RitualComponent(4,0,-4, RitualComponent.FIRE));
expulsionRitual.add(new RitualComponent(-4,0,4, RitualComponent.FIRE));
expulsionRitual.add(new RitualComponent(-4,0,-4, RitualComponent.FIRE));
ArrayList<RitualComponent> supressionRitual = new ArrayList();
supressionRitual.add(new RitualComponent(2,0,2, RitualComponent.WATER));
supressionRitual.add(new RitualComponent(2,0,-2, RitualComponent.WATER));
supressionRitual.add(new RitualComponent(-2,0,2, RitualComponent.WATER));
supressionRitual.add(new RitualComponent(-2,0,-2, RitualComponent.WATER));
Rituals.ritualList.add(new Rituals(waterRitual, 1, 500, new RitualEffectWater(), "Ritual of the Full Spring"));
Rituals.ritualList.add(new Rituals(lavaRitual, 1, 10000, new RitualEffectLava(), "Serenade of the Nether"));
@ -1959,6 +2021,8 @@ public class AlchemicalWizardry
Rituals.ritualList.add(new Rituals(flightRitual, 2, 1000000, new RitualEffectFlight(), "Reverence of the Condor"));
Rituals.ritualList.add(new Rituals(meteorRitual, 2, 1000000, new RitualEffectSummonMeteor(), "Mark of the Falling Tower"));
Rituals.ritualList.add(new Rituals(autoAlchemyRitual,1,20000,new RitualEffectAutoAlchemy(),"Ballad of Alchemy"));
Rituals.ritualList.add(new Rituals(expulsionRitual,1,1000000,new RitualEffectExpulsion(),"Aura of Expulsion"));
Rituals.ritualList.add(new Rituals(supressionRitual,1,1000,new RitualEffectSupression(),"Supression"));
//Rituals.ritualList.add(new Rituals(apiaryRitual,1,100,new RitualEffectApiaryOverclock(),"Apiary Overclock"));
}

View file

@ -93,6 +93,7 @@ public class BloodMagicConfiguration
AlchemicalWizardry.blockSpellParadigmBlockID = config.getBlock("BlockSpellParadigm", 1427).getInt();
AlchemicalWizardry.blockSpellModifierBlockID = config.getBlock("BlockSpellModifier", 1428).getInt();
AlchemicalWizardry.blockSpellEnhancementBlockID = config.getBlock("BlockSpellEnhancement", 1429).getInt();
AlchemicalWizardry.blockSpectralContainerBlockID = config.getBlock("BlockSpectralContainer", 1430).getInt();
//Items
AlchemicalWizardry.weakBloodOrbItemID = config.getItem("WeakBloodOrb", 17000).getInt();
AlchemicalWizardry.energyBlasterItemID = config.getItem("EnergyBlaster", 17001).getInt();
@ -183,6 +184,7 @@ public class BloodMagicConfiguration
AlchemicalWizardry.itemBloodFrameItemID = config.getItem("BloodFrame", 17082).getInt();
AlchemicalWizardry.baseComponentsItemID = config.getItem("BaseComponents", 17083).getInt();
AlchemicalWizardry.baseAlchemyComponentsItemID = config.getItem("BaseAlchemyComponents", 17084).getInt();
AlchemicalWizardry.itemSigilOfSupressionItemID = config.getItem("ItemSigilOfSupression", 17085).getInt();
} catch (Exception e)
{

View file

@ -45,6 +45,7 @@ public class ModBlocks
public static Block blockSpellParadigm;
public static Block blockSpellModifier;
public static Block blockSpellEnhancement;
public static Block blockSpectralContainer;
public static void init()
{
@ -79,5 +80,6 @@ public class ModBlocks
blockSpellParadigm = new BlockSpellParadigm(AlchemicalWizardry.blockSpellParadigmBlockID);
blockSpellModifier = new BlockSpellModifier(AlchemicalWizardry.blockSpellModifierBlockID);
blockSpellEnhancement = new BlockSpellEnhancement(AlchemicalWizardry.blockSpellEnhancementBlockID);
blockSpectralContainer = new BlockSpectralContainer(AlchemicalWizardry.blockSpectralContainerBlockID);
}
}

View file

@ -1,9 +1,70 @@
package WayofTime.alchemicalWizardry;
import WayofTime.alchemicalWizardry.common.items.*;
import WayofTime.alchemicalWizardry.common.items.potion.*;
import WayofTime.alchemicalWizardry.common.items.sigil.*;
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.FireScribeTool;
import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase;
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.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.EnhancedTelepositionFocus;
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.ItemSigilOfSupression;
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;
/**
* Created with IntelliJ IDEA.
@ -108,6 +169,7 @@ public class ModItems
public static Item itemBloodLightSigil;
public static Item itemComplexSpellCrystal;
public static Item itemBloodFrame;
public static Item itemSigilOfSupression;
public static void init()
{
@ -190,5 +252,6 @@ public class ModItems
itemComplexSpellCrystal = new ItemComplexSpellCrystal(AlchemicalWizardry.itemComplexSpellCrystalItemID).setUnlocalizedName("itemComplexSpellCrystal");
baseItems = new ItemComponents(AlchemicalWizardry.baseComponentsItemID).setUnlocalizedName("baseItems");
baseAlchemyItems = new ItemAlchemyBase(AlchemicalWizardry.baseAlchemyComponentsItemID).setUnlocalizedName("baseAlchemyItems");
itemSigilOfSupression = new ItemSigilOfSupression(AlchemicalWizardry.itemSigilOfSupressionItemID).setUnlocalizedName("itemSigilOfSupression");
}
}

View file

@ -64,7 +64,7 @@ public class BlockBloodLightSource extends Block
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity)
{
this.setBlockBounds(0.40F, 0.40F, 0.40F, 0.60F, 0.60F, 0.60F);
this.setBlockBounds(0.4f,0.4f,0.4f,0.6f,0.6f,0.6f);
//super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
}
@ -72,4 +72,10 @@ public class BlockBloodLightSource extends Block
{
return 0;
}
@Override
public boolean isAirBlock(World world, int x, int y, int z)
{
return true;
}
}

View file

@ -0,0 +1,68 @@
package WayofTime.alchemicalWizardry.common.block;
import java.util.List;
import java.util.Random;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockSpectralContainer extends BlockContainer
{
public BlockSpectralContainer(int par1)
{
super(par1, Material.cloth);
//setCreativeTab(AlchemicalWizardry.tabBloodMagic);
this.setUnlocalizedName("blockSpectralContainer");
this.setBlockBounds(0,0,0,0,0,0);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlockBloodLight");
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity)
{
}
public int quantityDropped(Random par1Random)
{
return 0;
}
@Override
public TileEntity createNewTileEntity(World world)
{
return new TESpectralContainer();
}
@Override
public boolean isBlockReplaceable(World par1World, int par2, int par3, int par4)
{
return true;
}
}

View file

@ -64,41 +64,15 @@ public class SpectralBlock extends Block
return 1;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are)
{
//TEAltar tileEntity = (TEAltar)world.getBlockTileEntity(x, y, z);
if (player.isSneaking())
{
return false;
}
ItemStack playerItem = player.getCurrentEquippedItem();
if (playerItem != null)
{
if (playerItem.getItem() instanceof ItemBlock)
{
world.setBlock(x, y, z, playerItem.itemID, playerItem.getItemDamage(), 3);
if (!player.capabilities.isCreativeMode)
{
playerItem.stackSize--;
}
return true;
} else
{
return false;
}
}
return true;
}
@Override
public void onBlockAdded(World par1World, int par2, int par3, int par4)
{
par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, 100);
}
@Override
public boolean isBlockReplaceable(World par1World, int par2, int par3, int par4)
{
return true;
}
}

View file

@ -706,7 +706,7 @@ public class EntityElemental extends EntityDemon
{
EntityLivingBase entityLiving1 = entities.get(i);
if (!(entityLiving1 instanceof EntityPlayer && ((EntityPlayer) entityLiving1).capabilities.disableDamage) && entityLiving1.isEntityAlive())
if (!(entityLiving1 instanceof EntityPlayer && ((EntityPlayer) entityLiving1).capabilities.disableDamage) && entityLiving1.isEntityAlive() && !(entityLiving1 instanceof EntityElemental))
{
double d5 = entityLiving1.getDistanceSq(par1, par3, par5);
double d6 = par2;

View file

@ -0,0 +1,252 @@
package WayofTime.alchemicalWizardry.common.items.sigil;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Icon;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
{
private static Icon activeIcon;
private static Icon passiveIcon;
private int tickDelay = 200;
private int radius = 5;
private int refresh = 100;
public ItemSigilOfSupression(int id)
{
super(id);
this.maxStackSize = 1;
setEnergyUsed(200);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("I have a very magnetic personality!");
if (!(par1ItemStack.stackTagCompound == null))
{
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
{
par3List.add("Activated");
} else
{
par3List.add("Deactivated");
}
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_deactivated");
this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_activated");
this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfMagnetism_deactivated");
}
@Override
public Icon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
{
if (stack.stackTagCompound == null)
{
stack.setTagCompound(new NBTTagCompound());
}
NBTTagCompound tag = stack.stackTagCompound;
if (tag.getBoolean("isActive"))
{
return this.activeIcon;
} else
{
return this.passiveIcon;
}
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int par1)
{
if (par1 == 1)
{
return this.activeIcon;
} else
{
return this.passiveIcon;
}
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
if(SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
{
return par1ItemStack;
}
if (par3EntityPlayer.isSneaking())
{
return par1ItemStack;
}
if (par1ItemStack.stackTagCompound == null)
{
par1ItemStack.setTagCompound(new NBTTagCompound());
}
NBTTagCompound tag = par1ItemStack.stackTagCompound;
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
if (tag.getBoolean("isActive"))
{
par1ItemStack.setItemDamage(1);
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
if (!par3EntityPlayer.capabilities.isCreativeMode)
{
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
}
} else
{
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
}
return par1ItemStack;
}
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
{
if (!(par3Entity instanceof EntityPlayer))
{
return;
}
if(SpellHelper.isFakePlayer(par2World, (EntityPlayer)par3Entity))
{
return;
}
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
if (par1ItemStack.stackTagCompound == null)
{
par1ItemStack.setTagCompound(new NBTTagCompound());
}
if (par1ItemStack.stackTagCompound.getBoolean("isActive")&&(!par2World.isRemote))
{
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
int x = (int)blockVec.xCoord;
int y = (int)blockVec.yCoord;
int z = (int)blockVec.zCoord;
for (int i = -radius; i <= radius; i++)
{
for (int j = -radius; j <= radius; j++)
{
for(int k = -radius; k <= radius; k++)
{
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f))
{
continue;
}
Block block = Block.blocksList[par2World.getBlockId(x+i, y+j, z+k)];
if(SpellHelper.isBlockFluid(block))
{
TESpectralContainer.createSpectralBlockAtLocation(par2World, x+i, y+j, z+k, refresh);
}
else
{
TileEntity tile = par2World.getBlockTileEntity(x+i, y+j, z+k);
if(tile instanceof TESpectralContainer)
{
((TESpectralContainer) tile).resetDuration(refresh);
}
}
}
}
}
}
return;
}
@Override
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
{
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
int x = (int)blockVec.xCoord;
int y = (int)blockVec.yCoord;
int z = (int)blockVec.zCoord;
for (int i = -radius; i <= radius; i++)
{
for (int j = -radius; j <= radius; j++)
{
for(int k = -radius; k <= radius; k++)
{
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f))
{
continue;
}
Block block = Block.blocksList[world.getBlockId(x+i, y+j, z+k)];
if(SpellHelper.isBlockFluid(block))
{
TESpectralContainer.createSpectralBlockAtLocation(world, x+i, y+j, z+k, refresh);
}
else
{
TileEntity tile = world.getBlockTileEntity(x+i, y+j, z+k);
if(tile instanceof TESpectralContainer)
{
((TESpectralContainer) tile).resetDuration(refresh);
}
}
}
}
}
}
@Override
public boolean isUpgrade()
{
return true;
}
@Override
public int getEnergyForTenSeconds()
{
return 200;
}
}

View file

@ -0,0 +1,230 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
public class RitualEffectExpulsion extends RitualEffect
{
@Override
public void performEffect(IMasterRitualStone ritualStone)
{
String owner = ritualStone.getOwner();
World worldSave = MinecraftServer.getServer().worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
if (data == null)
{
data = new LifeEssenceNetwork(owner);
worldSave.setItemData(owner, data);
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
if (currentEssence < this.getCostPerRefresh())
{
EntityPlayer entityOwner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(owner);
if (entityOwner == null)
{
return;
}
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
} else
{
int d0 = 25;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, d0, d0);
axisalignedbb.maxY = Math.min((double) world.getHeight(), (double) (y + 1 + d0));
List list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);
Iterator iterator = list.iterator();
EntityPlayer entityplayer;
boolean flag = false;
while (iterator.hasNext())
{
entityplayer = (EntityPlayer) iterator.next();
if (!(entityplayer.getEntityName().equals(owner)))
{
if(entityplayer.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding)||entityplayer.capabilities.isCreativeMode)
{
continue;
}
teleportRandomly(entityplayer,100);
flag = true;
}
}
if (flag)
{
data.currentEssence = currentEssence - this.getCostPerRefresh();
data.markDirty();
}
}
}
@Override
public int getCostPerRefresh()
{
return 1000;
}
public boolean teleportRandomly(EntityLivingBase entityLiving, double distance)
{
double x = entityLiving.posX;
double y = entityLiving.posY;
double z = entityLiving.posZ;
Random rand = new Random();
double d0 = x + (rand.nextDouble() - 0.5D) * distance;
double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2);
double d2 = z + (rand.nextDouble() - 0.5D) * distance;
int i = 0;
while (!teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100)
{
d0 = x + (rand.nextDouble() - 0.5D) * distance;
d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2);
d2 = z + (rand.nextDouble() - 0.5D) * distance;
i++;
}
if (i >= 100)
{
return false;
}
return true;
//return SpellTeleport.teleportTo(entityLiving, d0, d1, d2,x,y,z);
}
public boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, double lastX, double lastY, double lastZ)
{
EnderTeleportEvent event = new EnderTeleportEvent(entityLiving, par1, par3, par5, 0);
if (MinecraftForge.EVENT_BUS.post(event))
{
return false;
}
double d3 = lastX;
double d4 = lastY;
double d5 = lastZ;
SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ);
boolean flag = false;
int i = MathHelper.floor_double(entityLiving.posX);
int j = MathHelper.floor_double(entityLiving.posY);
int k = MathHelper.floor_double(entityLiving.posZ);
int l;
if (entityLiving.worldObj.blockExists(i, j, k))
{
boolean flag1 = false;
while (!flag1 && j > 0)
{
l = entityLiving.worldObj.getBlockId(i, j - 1, k);
if (l != 0 && Block.blocksList[l].blockMaterial.blocksMovement())
{
flag1 = true;
} else
{
--entityLiving.posY;
--j;
}
}
if (flag1)
{
SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ);
if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox))
{
flag = true;
}
}
}
if (!flag)
{
SpellTeleport.moveEntityViaTeleport(entityLiving, d3, d4, d5);
return false;
} else
{
short short1 = 128;
for (l = 0; l < short1; ++l)
{
double d6 = (double) l / ((double) short1 - 1.0D);
float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D;
double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height;
double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D;
entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2);
}
// this.worldObj.playSoundEffect(d3, d4, d5, "mob.endermen.portal", 1.0F, 1.0F);
// this.playSound("mob.endermen.portal", 1.0F, 1.0F);
return true;
}
}
public void moveEntityViaTeleport(EntityLivingBase entityLiving, double x, double y, double z)
{
if (entityLiving instanceof EntityPlayer)
{
if (entityLiving != null && entityLiving instanceof EntityPlayerMP)
{
EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving;
if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == entityLiving.worldObj)
{
EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, x, y, z, 5.0F);
if (!MinecraftForge.EVENT_BUS.post(event))
{
if (entityLiving.isRiding())
{
entityLiving.mountEntity((Entity) null);
}
entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
// this.getThrower().fallDistance = 0.0F;
// this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
}
}
}
} else if (entityLiving != null)
{
entityLiving.setPosition(x, y, z);
}
}
}

View file

@ -0,0 +1,93 @@
package WayofTime.alchemicalWizardry.common.rituals;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
public class RitualEffectSupression extends RitualEffect
{
@Override
public void performEffect(IMasterRitualStone ritualStone)
{
String owner = ritualStone.getOwner();
World worldSave = MinecraftServer.getServer().worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
if (data == null)
{
data = new LifeEssenceNetwork(owner);
worldSave.setItemData(owner, data);
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorldObj();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
if (currentEssence < this.getCostPerRefresh())
{
EntityPlayer entityOwner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(owner);
if (entityOwner == null)
{
return;
}
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
} else
{
int radius = 10;
for (int i = -radius; i <= radius; i++)
{
for (int j = -radius; j <= radius; j++)
{
for(int k = -radius; k <= radius; k++)
{
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f))
{
continue;
}
Block block = Block.blocksList[world.getBlockId(x+i, y+j, z+k)];
if(SpellHelper.isBlockFluid(block))
{
TESpectralContainer.createSpectralBlockAtLocation(world, x+i, y+j, z+k, 3);
}
else
{
TileEntity tile = world.getBlockTileEntity(x+i, y+j, z+k);
if(tile instanceof TESpectralContainer)
{
((TESpectralContainer) tile).resetDuration(3);
}
}
}
}
}
data.currentEssence = currentEssence - this.getCostPerRefresh();
data.markDirty();
}
}
@Override
public int getCostPerRefresh()
{
return 1;
}
}

View file

@ -0,0 +1,142 @@
package WayofTime.alchemicalWizardry.common.tileEntity;
import WayofTime.alchemicalWizardry.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class TESpectralContainer extends TileEntity
{
private ItemStack[] inv;
private int ticksRemaining;
public TESpectralContainer()
{
this.inv = new ItemStack[1];
ticksRemaining = 0;
}
@Override
public void readFromNBT(NBTTagCompound par1NBTTagCompound)
{
super.readFromNBT(par1NBTTagCompound);
NBTTagList tagList = par1NBTTagCompound.getTagList("Inventory");
for (int i = 0; i < tagList.tagCount(); i++)
{
NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i);
int slot = tag.getByte("Slot");
if (slot >= 0 && slot < inv.length)
{
inv[slot] = ItemStack.loadItemStackFromNBT(tag);
}
}
ticksRemaining = par1NBTTagCompound.getInteger("ticksRemaining");
}
@Override
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeToNBT(par1NBTTagCompound);
NBTTagList itemList = new NBTTagList();
for (int i = 0; i < inv.length; i++)
{
ItemStack stack = inv[i];
if (inv[i] != null)
{
NBTTagCompound tag = new NBTTagCompound();
tag.setByte("Slot", (byte) i);
inv[i].writeToNBT(tag);
itemList.appendTag(tag);
}
}
par1NBTTagCompound.setTag("Inventory", itemList);
par1NBTTagCompound.setInteger("ticksRemaining", ticksRemaining);
}
@Override
public void updateEntity()
{
super.updateEntity();
this.ticksRemaining--;
if(this.ticksRemaining<=0)
{
this.returnContainedBlock();
}
}
public static boolean createSpectralBlockAtLocation(World world, int x, int y, int z, int duration)
{
if(world.getBlockTileEntity(x, y, z)==null)
{
Block block = Block.blocksList[world.getBlockId(x, y, z)];
if(block==null)
{
return false;
}
int meta = world.getBlockMetadata(x, y, z);
ItemStack item = new ItemStack(block, 1, meta);
world.setBlock(x, y, z, ModBlocks.blockSpectralContainer.blockID);
TileEntity tile = world.getBlockTileEntity(x, y, z);
if(tile instanceof TESpectralContainer)
{
((TESpectralContainer) tile).setContainedItem(item);
((TESpectralContainer) tile).setDuration(duration);
return true;
}
}
return false;
}
public void setDuration(int dur)
{
this.ticksRemaining = dur;
}
public void resetDuration(int dur)
{
if(this.ticksRemaining<dur)
{
this.ticksRemaining = dur;
}
}
public void setContainedItem(ItemStack item)
{
this.inv[0] = item;
}
public void returnContainedBlock()
{
ItemStack item = this.inv[0];
if(item!=null)
{
Block block = Block.blocksList[item.itemID];
int meta = item.getItemDamage();
if(block != null)
{
this.worldObj.setBlock(xCoord, yCoord, zCoord, item.itemID, meta, 6);
}
}else
{
this.worldObj.setBlockToAir(xCoord, yCoord, zCoord);
}
}
}