Pushing changes in 1.7.2 to 1.6.4 build

This commit is contained in:
WayofTime 2014-03-15 17:43:59 -04:00
parent a4a02b4118
commit fa9112493c
170 changed files with 4803 additions and 272 deletions

View file

@ -3,141 +3,134 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeOffensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileOffensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefaultEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefensiveEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfEnvironmentalEarth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfOffensiveEarth;
public class SpellEffectEarth extends SpellEffect
{
@Override
public void defaultModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void offensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileOffensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefensiveEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
{
parad.addUpdateEffect(new ProjectileEnvironmentalEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defaultModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void offensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfOffensiveEarth(this.powerEnhancement,this.potencyEnhancement, this.costEnhancement));
}
@Override
public void defensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfDefensiveEarth(this.powerEnhancement,this.potencyEnhancement, this.costEnhancement));
}
@Override
public void environmentalModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
parad.addSelfSpellEffect(new SelfEnvironmentalEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defaultModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void offensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeOffensiveEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
public void environmentalModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
parad.addWorldEffect(new MeleeEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
}
@Override
protected int getCostForDefaultProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*Math.pow((0.5*(this.powerEnhancement)+1)*2 + 1,3)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(3*Math.pow((this.powerEnhancement*2+1),2)*(this.potencyEnhancement*2+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForEnvironmentProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefaultSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(20*Math.pow(1.5*powerEnhancement+1,2)*(2*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*Math.pow(2*this.powerEnhancement+1,2)*(this.potencyEnhancement+1));
}
@Override
protected int getCostForDefenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(750*(1.1*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
@ -150,28 +143,24 @@ public class SpellEffectEarth extends SpellEffect
@Override
protected int getCostForDefaultMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(50*Math.pow(1.5*this.potencyEnhancement + 1,3)*(0.5*this.powerEnhancement + 1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(20*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1));
}
@Override
protected int getCostForDefenseMelee()
{
// TODO Auto-generated method stub
return 0;
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));
}
@Override
protected int getCostForEnvironmentMelee()
{
// TODO Auto-generated method stub
return 0;
return (int)(500*Math.pow(2*this.potencyEnhancement+1, 3)*(0.25*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
}
}

View file

@ -4,6 +4,9 @@ import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefaultFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefensiveFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileEnvironmentalFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileOffensiveFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefaultFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefensiveFire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfEnvironmentalFire;
@ -21,25 +24,19 @@ public class SpellEffectFire extends SpellEffect
@Override
public void offensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
parad.damage+=this.potencyEnhancement;
parad.addImpactEffect(new ProjectileOffensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
parad.damage+=this.potencyEnhancement;
parad.addImpactEffect(new ProjectileDefensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
parad.damage+=this.potencyEnhancement;
parad.addUpdateEffect(new ProjectileEnvironmentalFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
@ -97,48 +94,43 @@ public class SpellEffectFire extends SpellEffect
@Override
protected int getCostForDefaultProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)((5*Math.pow(1.5*this.powerEnhancement+1, 2)*(1.5*this.potencyEnhancement+1)+this.potencyEnhancement*15)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(10*Math.pow((this.powerEnhancement)*1.3+1,2)*((1.5*this.potencyEnhancement+1))*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(25*Math.pow(1*this.powerEnhancement+1,2)*(1*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForEnvironmentProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(75*(0.5*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefaultSelf()
{
return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement));
return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseSelf()
{
return 500*(int)((this.powerEnhancement+1)*Math.pow(2, potencyEnhancement));
return 500*(int)((this.powerEnhancement+1)*Math.pow(2, potencyEnhancement)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForDefenseSelf()
{
// TODO Auto-generated method stub
return 0;
return (int)(25*(3*this.potencyEnhancement+1)*(2*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
@ -174,5 +166,4 @@ public class SpellEffectFire extends SpellEffect
// TODO Auto-generated method stub
return 0;
}
}

View file

@ -3,36 +3,34 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileDefaultWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileEnvironmentalWind;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileOffensiveWind;
public class SpellEffectWind extends SpellEffect
{
@Override
public void defaultModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileDefaultWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void offensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.addImpactEffect(new ProjectileOffensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
parad.ricochetMax+=this.potencyEnhancement;
}
@Override
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
{
parad.addUpdateEffect(new ProjectileEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
}
@Override
@ -94,15 +92,13 @@ public class SpellEffectWind extends SpellEffect
@Override
protected int getCostForDefaultProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
protected int getCostForOffenseProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(100*(0.5*this.potencyEnhancement+1)*(this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override
@ -115,8 +111,7 @@ public class SpellEffectWind extends SpellEffect
@Override
protected int getCostForEnvironmentProjectile()
{
// TODO Auto-generated method stub
return 0;
return (int)(50*(this.powerEnhancement+1)*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
}
@Override

View file

@ -1,10 +1,11 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFluid;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@ -16,6 +17,11 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.FakePlayer;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.PacketHandler;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
public class SpellHelper
{
@ -46,6 +52,11 @@ public class SpellHelper
return world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(posX-0.5f, posY-0.5f, posZ-0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius));
}
public static List<EntityPlayer> getPlayersInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius)
{
return world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX-0.5f, posY-0.5f, posZ-0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(horizontalRadius, verticalRadius, horizontalRadius));
}
public static double gaussian(double d)
{
return d * ((rand.nextFloat() - 0.5D));
@ -110,6 +121,11 @@ public class SpellHelper
}
}
public static String getUsername(EntityPlayer player)
{
return player.getDisplayName();
}
public static boolean isFakePlayer(World world, EntityPlayer player)
{
if(world.isRemote)
@ -135,4 +151,82 @@ public class SpellHelper
return false;
}
public static void smashBlock(World world, int posX, int posY, int posZ)
{
Block block = Block.blocksList[world.getBlockId(posX, posY, posZ)];
if(block==Block.stone)
{
world.setBlock(posX, posY, posZ, Block.cobblestone.blockID);
return;
}
else if(block==Block.cobblestone)
{
world.setBlock(posX, posY, posZ, Block.gravel.blockID);
return;
}
else if(block==Block.gravel)
{
world.setBlock(posX, posY, posZ, Block.sand.blockID);
return;
}
}
public static boolean isBlockFluid(Block block)
{
return block instanceof BlockFluid;
}
public static void evaporateWaterBlock(World world, int posX, int posY, int posZ)
{
Block block = Block.blocksList[world.getBlockId(posX, posY, posZ)];
if(block == Block.waterMoving || block == Block.waterStill)
{
world.setBlockToAir(posX, posY, posZ);
}
}
public static ItemStack getDustForOre(ItemStack item)
{
String oreName = OreDictionary.getOreName(OreDictionary.getOreID(item));
if(oreName.contains("ore"))
{
String lowercaseOre = oreName;
lowercaseOre.toLowerCase();
boolean isAllowed = false;
for(String str : AlchemicalWizardry.allowedCrushedOresArray)
{
if(lowercaseOre.contains(str))
{
isAllowed = true;
}
}
if(!isAllowed)
{
return null;
}
String dustName = oreName.replace("ore", "dust");
ArrayList<ItemStack> items = OreDictionary.getOres(dustName);
if(items!=null && items.size()>=1)
{
return(items.get(0).copy());
}
}
return null;
}
public static void setPlayerSpeedFromServer(EntityPlayer player, double xVel, double yVel, double zVel)
{
PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(xVel, yVel, zVel), (Player)player);
}
}

View file

@ -6,6 +6,6 @@ import net.minecraft.world.World;
public interface IProjectileImpactEffect
{
public void onEntityImpact(Entity mop);
public void onEntityImpact(Entity mop, Entity proj);
public void onTileImpact(World world, MovingObjectPosition mop);
}

View file

@ -0,0 +1,33 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffect
{
protected float range;
public MeleeSpellCenteredWorldEffect(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onWorldEffect(World world, EntityPlayer entityPlayer)
{
Vec3 lookVec = entityPlayer.getLook(range).normalize();
int x = (int)(entityPlayer.posX + lookVec.xCoord*range);
int y = (int)(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord*range);
int z = (int)(entityPlayer.posZ + lookVec.zCoord*range);
this.onCenteredWorldEffect(entityPlayer, world, x, y, z);
}
public void setRange(float range)
{
this.range = range;
}
public abstract void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ);
}

View file

@ -0,0 +1,41 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityFallingSand;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect
{
public MeleeDefaultEarth(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(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++)
{
if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getBlockTileEntity(posX + i, posY + j, posZ + k)==null)
{
int id = world.getBlockId(posX + i, posY + j, posZ + k);
int meta = world.getBlockMetadata(posX + i, posY + j, posZ + k);
EntityFallingSand entity = new EntityFallingSand(world, posX + i + 0.5f, posY + j + 0.5f, posZ + k + 0.5f, id, meta);
world.spawnEntityInWorld(entity);
}
}
}
}
}
}

View file

@ -0,0 +1,37 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect
{
public MeleeDefensiveEarth(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)
{
ForgeDirection dir = SpellHelper.getDirectionForLookVector(player.getLook(1));
int vertRadius = (int)(2 + 1.0f/2.0f*Math.pow(this.potencyUpgrades,2)+1.0f/2.0f*this.potencyUpgrades);
int horizRadius = this.potencyUpgrades+1;
int xOff = dir.offsetX;
int zOff = dir.offsetZ;
for(int i=-horizRadius; i<=horizRadius; i++)
{
for(int j=0; j<vertRadius; j++)
{
BlockTeleposer.swapBlocks(world, world, posX + i*zOff, posY + j, posZ + i*xOff, posX + i*zOff, posY + j - vertRadius, posZ + i*xOff);
}
}
}
}

View file

@ -0,0 +1,48 @@
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;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect
{
public MeleeEnvironmentalEarth(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++)
{
if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getBlockTileEntity(posX + i, posY + j, posZ + k)==null)
{
ItemStack stack = new ItemStack(Block.blocksList[world.getBlockId(posX+i, posY+j, posZ+k)],1,world.getBlockMetadata(posX+i, posY+j, posZ+k));
ItemStack dustStack = SpellHelper.getDustForOre(stack);
if(dustStack!=null)
{
dustStack.stackSize *= 3;
world.spawnEntityInWorld(new EntityItem(world,posX,posY,posZ,dustStack));
world.setBlockToAir(posX+i, posY+j, posZ+k);
}
}
}
}
}
}
}

View file

@ -0,0 +1,34 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect
{
public MeleeOffensiveEarth(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.smashBlock(world, posX+i, posY+j, posZ+k);
}
}
}
}
}

View file

@ -0,0 +1,57 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
public class ProjectileDefaultEarth extends ProjectileImpactEffect
{
public ProjectileDefaultEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onEntityImpact(Entity mop, Entity proj)
{
// TODO Auto-generated method stub
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
int horizRange = (int)(0.5*(this.powerUpgrades)+1);
int vertRange = (int)(0.5*(this.powerUpgrades)+1);
int posX = mop.blockX;
int posY = mop.blockY;
int posZ = mop.blockZ;
for(int i=-horizRange; i<=horizRange; i++)
{
for(int j=-vertRange; j<=vertRange; j++)
{
for(int k=-horizRange; k<=horizRange; k++)
{
if(!world.isAirBlock(posX+i, posY+j, posZ+k))
{
Block block = Block.blocksList[world.getBlockId(posX+i, posY+j, posZ+k)];
if(block == null || block.getBlockHardness(world, posX+i, posY+j, posZ+k)==-1 || SpellHelper.isBlockFluid(block))
{
continue;
}
//block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k));
//world.destroyBlock(posX+i, posY+j, posZ+k, true);
world.destroyBlock(posX+i, posY+j, posZ+k, false);
}
}
}
}
}
}

View file

@ -0,0 +1,66 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileUpdateEffect;
public class ProjectileDefensiveEarth extends ProjectileImpactEffect
{
public ProjectileDefensiveEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onEntityImpact(Entity mop, Entity proj)
{
// TODO Auto-generated method stub
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
int horizRange = (int)(this.powerUpgrades);
int vertRange = (int)(this.potencyUpgrades);
int posX = mop.blockX;
int posY = mop.blockY;
int posZ = mop.blockZ;
for(int i=-horizRange; i<=horizRange; i++)
{
for(int j=-vertRange; j<=vertRange; j++)
{
for(int k=-horizRange; k<=horizRange; k++)
{
if(!world.isAirBlock(posX+i, posY+j, posZ+k))
{
Block block = Block.blocksList[world.getBlockId(posX+i, posY+j, posZ+k)];
if(block == null || block.getBlockHardness(world, posX+i, posY+j, posZ+k)==-1)
{
continue;
}
//block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k));
//world.destroyBlock(posX+i, posY+j, posZ+k, true);
if(world.rand.nextFloat()<0.6f)
{
SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k);
}
}
}
}
}
}
}

View file

@ -1,7 +1,11 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile;
@ -20,9 +24,9 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect
{
Vec3 posVec = SpellHelper.getEntityBlockVector(projectile);
int horizRange = this.powerUpgrades+2;
int vertRange = 0*this.potencyUpgrades+1;
int maxBlocks = (int)(2*Math.pow(this.potencyUpgrades,3)) + 3;
int horizRange = this.powerUpgrades+1;
int vertRange = (int)(0.5*(this.powerUpgrades+1));
int maxBlocks = (int)(2*Math.pow(3.47, this.potencyUpgrades));
int posX = (int)(posVec.xCoord);
int posY = (int)(posVec.yCoord);
@ -48,12 +52,14 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect
if(!worldObj.isAirBlock(posX+i, posY+j, posZ+k)&&blocksBroken<maxBlocks)
{
Block block = Block.blocksList[worldObj.getBlockId(posX+i, posY+j, posZ+k)];
if(block == null || block.blockHardness==-1)
if(block == null || block.getBlockHardness(worldObj, posX+i, posY+j, posZ+k)==-1 || SpellHelper.isBlockFluid(block))
{
continue;
}
//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.destroyBlock(posX+i, posY+j, posZ+k, true);
blocksBroken++;
}
}

View file

@ -0,0 +1,91 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
public class ProjectileOffensiveEarth extends ProjectileImpactEffect
{
public ProjectileOffensiveEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onEntityImpact(Entity mop, Entity proj)
{
int horizRange = (int)(this.powerUpgrades);
int vertDepth = (int)(3*this.potencyUpgrades+1);
Vec3 blockVector = SpellHelper.getEntityBlockVector(mop);
int posX = (int)(blockVector.xCoord);
int posY = (int)(blockVector.yCoord);
int posZ = (int)(blockVector.zCoord);
World world = mop.worldObj;
for(int i=-horizRange; i<=horizRange; i++)
{
for(int j=-vertDepth; j<0; j++)
{
for(int k=-horizRange; k<=horizRange; k++)
{
if(!world.isAirBlock(posX+i, posY+j, posZ+k))
{
Block block = Block.blocksList[world.getBlockId(posX+i, posY+j, posZ+k)];
if(block == null || block.getBlockHardness(world, posX+i, posY+j, posZ+k)==-1)
{
continue;
}
//block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k));
//world.destroyBlock(posX+i, posY+j, posZ+k, true);
if(block == Block.stone || block == Block.cobblestone || block == Block.sand || block == Block.gravel || block == Block.grass || block == Block.dirt)
{
world.setBlockToAir(posX+i, posY+j, posZ+k);
}
}
}
}
}
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
// int horizRange = (int)(this.powerUpgrades);
// int vertRange = (int)(this.potencyUpgrades);
//
// int posX = mop.blockX;
// int posY = mop.blockY;
// int posZ = mop.blockZ;
//
// for(int i=-horizRange; i<=horizRange; i++)
// {
// for(int j=-vertRange; j<=vertRange; j++)
// {
// for(int k=-horizRange; k<=horizRange; k++)
// {
// if(!world.isAirBlock(posX+i, posY+j, posZ+k))
// {
// Block block = world.getBlock(posX+i, posY+j, posZ+k);
// if(block == null || block.getBlockHardness(world, posX+i, posY+j, posZ+k)==-1)
// {
// continue;
// }
// //block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k));
// //world.destroyBlock(posX+i, posY+j, posZ+k, true);
// if(world.rand.nextFloat()<0.6f)
// {
// SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k);
// }
// }
// }
// }
// }
}
}

View file

@ -0,0 +1,52 @@
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;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfDefaultEarth extends SelfSpellEffect
{
public SelfDefaultEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int horizRadius = this.powerUpgrades;
int vertRange = 5 + 10*this.potencyUpgrades;
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.yCoord) - 1;
int posZ = (int)(blockVec.zCoord);
for(int i=-horizRadius; i<=horizRadius; i++)
{
for(int k=-horizRadius; k<=horizRadius; k++)
{
if(!world.isAirBlock(posX+i, posY, posZ+k))
{
continue;
}
for(int j=-1; j>=-vertRange; j--)
{
if(!world.isAirBlock(posX+i, posY+j, posZ+k)&&!SpellHelper.isBlockFluid(Block.blocksList[world.getBlockId(posX+i, posY+j, posZ+k)]))
{
BlockTeleposer.swapBlocks(world, world, posX+i, posY, posZ+k, posX+i, posY+j, posZ+k);
break;
}
}
}
}
}
}

View file

@ -0,0 +1,27 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfDefensiveEarth extends SelfSpellEffect
{
public SelfDefensiveEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int pot = 2*this.potencyUpgrades + 1;
int duration = 20*60*(this.powerUpgrades+1);
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id,duration, pot));
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, duration, pot));
}
}

View file

@ -0,0 +1,45 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
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;
public class SelfEnvironmentalEarth extends SelfSpellEffect
{
public SelfEnvironmentalEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int horizRadius = this.powerUpgrades + 1;
int vertRadius = this.potencyUpgrades + 2;
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.yCoord);
int posZ = (int)(blockVec.zCoord);
for(int i=-horizRadius; i<=horizRadius; i++)
{
for(int j=0; j<vertRadius; j++)
{
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);
}
}
}
}
}

View file

@ -0,0 +1,43 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfOffensiveEarth extends SelfSpellEffect
{
public SelfOffensiveEarth(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onSelfUse(World world, EntityPlayer player)
{
int horizRadius = this.powerUpgrades;
int vertRadius = this.potencyUpgrades + 1;
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
int posX = (int)(blockVec.xCoord);
int posY = (int)(blockVec.yCoord);
int posZ = (int)(blockVec.zCoord);
for(int i=-horizRadius; i<=horizRadius; i++)
{
for(int j=-vertRadius; j<0; j++)
{
for(int k=-horizRadius; k<=horizRadius; k++)
{
if(world.rand.nextFloat()<0.7f)
{
SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k);
}
}
}
}
}
}

View file

@ -1,10 +1,12 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
public class ProjectileDefaultFire extends ProjectileImpactEffect
{
@ -14,23 +16,23 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect
}
@Override
public void onEntityImpact(Entity mop)
{
mop.setFire((int)Math.pow(2,this.powerUpgrades));
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
int x = mop.blockX;
int y = mop.blockY;
int z = mop.blockZ;
int range = 0;
for(int i=-range; i<=range;i++)
public void onEntityImpact(Entity mop, Entity proj)
{
Vec3 blockVec = SpellHelper.getEntityBlockVector(mop);
int x = (int)(blockVec.xCoord);
int y = (int)(blockVec.yCoord);
int z = (int)(blockVec.zCoord);
World world = mop.worldObj;
int horizRange = 0;
int vertRange = 0;
for(int i=-horizRange; i<=horizRange;i++)
{
for(int j=-range; j<=range;j++)
for(int j=-vertRange; j<=vertRange;j++)
{
for(int k=-range; k<=range; k++)
for(int k=-horizRange; k<=horizRange; k++)
{
if(world.isAirBlock(x+i, y+j, z+k))
{
@ -39,6 +41,30 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect
}
}
}
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
int x = mop.blockX;
int y = mop.blockY;
int z = mop.blockZ;
int horizRange = 0;
int vertRange = 0;
for(int i=-horizRange; i<=horizRange;i++)
{
for(int j=-vertRange; j<=vertRange;j++)
{
for(int k=-horizRange; k<=horizRange; k++)
{
if(world.isAirBlock(x+i, y+j, z+k))
{
world.setBlock(x+i, y+j, z+k, Block.fire.blockID);
}
}
}
}
}
}

View file

@ -0,0 +1,47 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
public class ProjectileDefensiveFire extends ProjectileImpactEffect
{
public ProjectileDefensiveFire(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onEntityImpact(Entity mop, Entity proj)
{
mop.setFire(3*(this.potencyUpgrades+1));
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
int horizRange = (int)((this.powerUpgrades));
int vertRange = (int)((this.powerUpgrades));
int posX = mop.blockX;
int posY = mop.blockY;
int posZ = mop.blockZ;
for(int i=-horizRange; i<=horizRange; i++)
{
for(int j=-vertRange; j<=vertRange; j++)
{
for(int k=-horizRange; k<=horizRange; k++)
{
if(!world.isAirBlock(posX+i, posY+j, posZ+k))
{
SpellHelper.smeltBlockInWorld(world, posX+i, posY+j, posZ+k);
}
}
}
}
}
}

View file

@ -0,0 +1,46 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
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.ProjectileUpdateEffect;
public class ProjectileEnvironmentalFire extends ProjectileUpdateEffect
{
public ProjectileEnvironmentalFire(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onUpdateEffect(Entity projectile)
{
Vec3 posVec = SpellHelper.getEntityBlockVector(projectile);
int horizRange = this.powerUpgrades+1;
int vertRange = (int)(0.5*(this.powerUpgrades+1));
int posX = (int)(posVec.xCoord);
int posY = (int)(posVec.yCoord);
int posZ = (int)(posVec.zCoord);
World worldObj = projectile.worldObj;
for(int i=-horizRange; i<=horizRange; i++)
{
for(int j=-vertRange; j<=vertRange; j++)
{
for(int k=-horizRange; k<=horizRange; k++)
{
if(!worldObj.isAirBlock(posX+i, posY+j, posZ+k))
{
SpellHelper.evaporateWaterBlock(worldObj, posX + i, posY + j, posZ + k);
}
}
}
}
}
}

View file

@ -0,0 +1,81 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
public class ProjectileOffensiveFire extends ProjectileImpactEffect
{
public ProjectileOffensiveFire(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onEntityImpact(Entity mop, Entity proj)
{
int horizRange = (int)(this.powerUpgrades);
int vertDepth = (int)(3*this.potencyUpgrades+1);
Vec3 blockVector = SpellHelper.getEntityBlockVector(mop);
int posX = (int)(blockVector.xCoord);
int posY = (int)(blockVector.yCoord);
int posZ = (int)(blockVector.zCoord);
World world = mop.worldObj;
for(int i=-horizRange; i<=horizRange; i++)
{
for(int j=-vertDepth; j<0; j++)
{
for(int k=-horizRange; k<=horizRange; k++)
{
if(world.isAirBlock(posX+i, posY+j, posZ+k))
{
world.setBlock(posX + i, posY + j, posZ + k, Block.lavaMoving.blockID,7,3);
}
}
}
}
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
// int horizRange = (int)(this.powerUpgrades);
// int vertRange = (int)(this.potencyUpgrades);
//
// int posX = mop.blockX;
// int posY = mop.blockY;
// int posZ = mop.blockZ;
//
// for(int i=-horizRange; i<=horizRange; i++)
// {
// for(int j=-vertRange; j<=vertRange; j++)
// {
// for(int k=-horizRange; k<=horizRange; k++)
// {
// if(!world.isAirBlock(posX+i, posY+j, posZ+k))
// {
// Block block = world.getBlock(posX+i, posY+j, posZ+k);
// if(block == null || block.getBlockHardness(world, posX+i, posY+j, posZ+k)==-1)
// {
// continue;
// }
// //block.breakBlock(world, posX+i, posY+j, posZ+k, block.blockID, world.getBlockMetadata(posX+i, posY+j, posZ+k));
// //world.destroyBlock(posX+i, posY+j, posZ+k, true);
// if(world.rand.nextFloat()<0.6f)
// {
// SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k);
// }
// }
// }
// }
// }
}
}

View file

@ -1,7 +1,10 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfDefensiveFire extends SelfSpellEffect {
@ -14,11 +17,27 @@ public class SelfDefensiveFire extends SelfSpellEffect {
@Override
public void onSelfUse(World world, EntityPlayer player)
{
// TODO Auto-generated method stub
int horizRange = (int)(this.powerUpgrades);
int vertDepth = (int)(3*this.potencyUpgrades+1);
world.playAuxSFXAtEntity(player, 1008, (int)player.posX, (int)player.posY, (int)player.posZ, 0);
Vec3 blockVector = SpellHelper.getEntityBlockVector(player);
int posX = (int)(blockVector.xCoord);
int posY = (int)(blockVector.yCoord);
int posZ = (int)(blockVector.zCoord);
for(int i=-horizRange; i<=horizRange; i++)
{
for(int j=-vertDepth; j<0; j++)
{
for(int k=-horizRange; k<=horizRange; k++)
{
if(world.isAirBlock(posX+i, posY+j, posZ+k))
{
world.setBlock(posX + i, posY + j, posZ + k, Block.lavaMoving.blockID,7,3);
}
}
}
}
}
}

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,(this.powerUpgrades+1)*this.powerUpgrades,this.potencyUpgrades));
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,200*(this.powerUpgrades+1)*(this.powerUpgrades+1),this.potencyUpgrades));
}
}

View file

@ -1,12 +1,9 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
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.ExtrapolatedMeleeEntityEffect;

View file

@ -5,7 +5,6 @@ import net.minecraft.entity.Entity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
public class ProjectileDefaultIce extends ProjectileImpactEffect
@ -16,7 +15,7 @@ public class ProjectileDefaultIce extends ProjectileImpactEffect
}
@Override
public void onEntityImpact(Entity mop)
public void onEntityImpact(Entity mop, Entity proj)
{
return;
}

View file

@ -15,7 +15,7 @@ public class ProjectileDefensiveIce extends ProjectileImpactEffect
}
@Override
public void onEntityImpact(Entity mop)
public void onEntityImpact(Entity mop, Entity proj)
{
return;
}

View file

@ -16,7 +16,7 @@ public class ProjectileOffensiveIce extends ProjectileImpactEffect
}
@Override
public void onEntityImpact(Entity mop)
public void onEntityImpact(Entity mop, Entity proj)
{
if(mop instanceof EntityLivingBase)
{

View file

@ -1,12 +1,9 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
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;
@ -28,7 +25,8 @@ public class SelfDefaultIce extends SelfSpellEffect
double yVel = 1*(0.4*this.powerUpgrades+0.75);
PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(player.motionX, yVel, player.motionZ),(Player)player);
//PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(player.motionX, yVel, player.motionZ),(Player)player);
SpellHelper.setPlayerSpeedFromServer(player, player.motionX, yVel, player.motionZ);
for(int i=0;i<2;i++)
{

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.potion.PotionEffect;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
public class ProjectileDefaultWind extends ProjectileImpactEffect
{
public ProjectileDefaultWind(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onEntityImpact(Entity mop, Entity proj)
{
float wantedYVel = (float)((0.5)*(0.5*this.potencyUpgrades + 1));
mop.motionX = proj.motionX;
mop.motionY = mop.motionY += wantedYVel;
mop.motionZ = proj.motionZ;
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
return;
}
}

View file

@ -40,6 +40,7 @@ public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect
{
if(entity instanceof EntityItem)
{
((EntityItem)entity).delayBeforeCanPickup = 0;
entity.onCollideWithPlayer((EntityPlayer)shooter);
}
}

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.potion.PotionEffect;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
public class ProjectileOffensiveWind extends ProjectileImpactEffect
{
public ProjectileOffensiveWind(int power, int potency, int cost)
{
super(power, potency, cost);
}
@Override
public void onEntityImpact(Entity mop, Entity proj)
{
if(mop instanceof EntityLiving)
{
((EntityLiving) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id,(int)(100*(2*this.powerUpgrades+1)*(1/(this.potencyUpgrades+1))),this.potencyUpgrades));
}
}
@Override
public void onTileImpact(World world, MovingObjectPosition mop)
{
return;
}
}