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

@ -11,18 +11,17 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec
public MeleeSpellCenteredWorldEffect(int power, int potency, int cost)
{
super(power, potency, cost);
range = 0;
}
@Override
public void onWorldEffect(World world, EntityPlayer entityPlayer)
{
Vec3 lookVec = entityPlayer.getLook(range);
int x = (int)(entityPlayer.posX + lookVec.xCoord);
int y = (int)(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord);
int z = (int)(entityPlayer.posZ + lookVec.zCoord);
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(world, x, y, z);
this.onCenteredWorldEffect(entityPlayer, world, x, y, z);
}
public void setRange(float range)
@ -30,5 +29,5 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec
this.range = range;
}
public abstract void onCenteredWorldEffect(World world, int posX, int posY, int posZ);
public abstract void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ);
}

View file

@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.e
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
@ -10,17 +11,19 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect
public MeleeDefaultEarth(int power, int potency, int cost)
{
super(power, potency, cost);
this.setRange(2);
this.setRange(3*power + 2);
}
@Override
public void onCenteredWorldEffect(World world, int posX, int posY, int posZ)
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
{
for(int i=-3; i<=3; i++)
int radius = this.potencyUpgrades;
for(int i=-radius; i<=radius; i++)
{
for(int j=-3; j<=3; j++)
for(int j=-radius; j<=radius; j++)
{
for(int k=-3; k<=3; k++)
for(int k=-radius; k<=radius; k++)
{
if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k)==null)
{

View file

@ -0,0 +1,39 @@
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;
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,47 @@
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 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.getTileEntity(posX + i, posY + j, posZ + k)==null)
{
ItemStack stack = new ItemStack(world.getBlock(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,51 @@
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 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(world.getBlock(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

@ -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));
}
}