Anti-comments sweep!
This commit is contained in:
parent
e6a10f3f06
commit
dea1f87078
454 changed files with 23594 additions and 26739 deletions
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HomSpellRegistry
|
||||
{
|
||||
public static List<HomSpellComponent> spellList = new ArrayList();
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class SpellEarthBender extends HomSpell
|
||||
{
|
||||
|
@ -20,7 +19,6 @@ public class SpellEarthBender extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(100, 150, 350, 200);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,7 +133,6 @@ public class SpellEarthBender extends HomSpell
|
|||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
//PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, PacketHandler.getCustomParticlePacket("mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F));
|
||||
SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F);
|
||||
}
|
||||
|
||||
|
@ -190,7 +187,6 @@ public class SpellEarthBender extends HomSpell
|
|||
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
//PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, PacketHandler.getCustomParticlePacket("mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, 0.0F, 0.410F, 1.0F));
|
||||
SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ public class SpellExplosions extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(400, 500, 1900, 1500);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,7 +37,6 @@ public class SpellExplosions extends HomSpell
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new ExplosionProjectile(par2World, par3EntityPlayer, 6, true));
|
||||
}
|
||||
|
||||
|
@ -83,8 +81,6 @@ public class SpellExplosions extends HomSpell
|
|||
}
|
||||
|
||||
int distance = 4;
|
||||
// double yaw = par3EntityPlayer.rotationYaw/180*Math.PI;
|
||||
// double pitch = par3EntityPlayer.rotationPitch/180*Math.PI;
|
||||
par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight(), par3EntityPlayer.posZ, (float) (distance), false);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -11,8 +9,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class SpellFireBurst extends HomSpell
|
||||
{
|
||||
|
@ -22,7 +22,6 @@ public class SpellFireBurst extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(100, 300, 400, 100);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,8 +43,7 @@ public class SpellFireBurst extends HomSpell
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
FireProjectile proj = new FireProjectile(par2World, par3EntityPlayer, 7);
|
||||
FireProjectile proj = new FireProjectile(par2World, par3EntityPlayer, 7);
|
||||
par2World.spawnEntityInWorld(proj);
|
||||
}
|
||||
|
||||
|
@ -101,7 +99,6 @@ public class SpellFireBurst extends HomSpell
|
|||
par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
int d0 = 2;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
|
||||
//axisalignedbb.maxY = (double)this.worldObj.getHeight();
|
||||
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
|
@ -120,18 +117,6 @@ public class SpellFireBurst extends HomSpell
|
|||
entityLiving.setFire(100);
|
||||
entityLiving.attackEntityFrom(DamageSource.inFire, 2);
|
||||
}
|
||||
|
||||
// if (!par2World.isRemote)
|
||||
// {
|
||||
//
|
||||
// for(int i=0;i<10;i++)
|
||||
// {
|
||||
// for(int j=0;j<5;j++)
|
||||
// {
|
||||
// par2World.spawnEntityInWorld(new FireProjectile(par2World, par3EntityPlayer, 10,5,par3EntityPlayer.posX,par3EntityPlayer.posY+par3EntityPlayer.getEyeHeight(),par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw+i*36F,par3EntityPlayer.rotationPitch+j*72F));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class SpellFrozenWater extends HomSpell
|
||||
{
|
||||
|
@ -18,7 +18,6 @@ public class SpellFrozenWater extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(100, 200, 150, 100);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -40,7 +39,6 @@ public class SpellFrozenWater extends HomSpell
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new IceProjectile(par2World, par3EntityPlayer, 6));
|
||||
}
|
||||
|
||||
|
@ -187,8 +185,6 @@ public class SpellFrozenWater extends HomSpell
|
|||
for (int k = -radius; k <= radius; k++)
|
||||
{
|
||||
Block block = par2World.getBlock((int) par3EntityPlayer.posX + i - 1, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k);
|
||||
|
||||
//Block block = Block.blocksList[blockID];
|
||||
if (block == Blocks.water || block == Blocks.flowing_water)
|
||||
{
|
||||
par2World.setBlock((int) par3EntityPlayer.posX + i - 1, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.ice);
|
||||
|
@ -196,13 +192,6 @@ public class SpellFrozenWater extends HomSpell
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// int blockID = par2World.getBlockId((int)par3EntityPlayer.posX+i, (int)par3EntityPlayer.posY+j, (int)par3EntityPlayer.posZ+k);
|
||||
// //Block block = Block.blocksList[blockID];
|
||||
// if(blockID==Block.waterMoving.blockID||blockID==Block.waterStill.blockID)
|
||||
// {
|
||||
// par2World.setBlock((int)par3EntityPlayer.posX+i, (int)par3EntityPlayer.posY+j, (int)par3EntityPlayer.posZ+k, Blocks.ice);
|
||||
// }
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class SpellHolyBlast extends HomSpell
|
||||
{
|
||||
|
@ -23,7 +22,6 @@ public class SpellHolyBlast extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(100, 300, 500, 400);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -45,7 +43,6 @@ public class SpellHolyBlast extends HomSpell
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new HolyProjectile(par2World, par3EntityPlayer, 8));
|
||||
}
|
||||
|
||||
|
@ -75,7 +72,6 @@ public class SpellHolyBlast extends HomSpell
|
|||
double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance;
|
||||
float d0 = 0.5f;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0);
|
||||
//axisalignedbb.maxY = (double)this.worldObj.getHeight();
|
||||
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
|
@ -97,17 +93,13 @@ public class SpellHolyBlast extends HomSpell
|
|||
{
|
||||
i = 3;
|
||||
}
|
||||
|
||||
//entityLiving.setFire(50);
|
||||
entityLiving.attackEntityFrom(DamageSource.causePlayerDamage(par3EntityPlayer), 5 * i);
|
||||
//par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false);
|
||||
}
|
||||
|
||||
par2World.createExplosion(par3EntityPlayer, xCoord, yCoord, zCoord, (float) (1), false);
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
//PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, PacketHandler.getCustomParticlePacket("mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F));
|
||||
SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
@ -157,7 +149,6 @@ public class SpellHolyBlast extends HomSpell
|
|||
|
||||
int d0 = 3;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
|
||||
//axisalignedbb.maxY = (double)this.worldObj.getHeight();
|
||||
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
|
@ -179,10 +170,7 @@ public class SpellHolyBlast extends HomSpell
|
|||
{
|
||||
i = 3;
|
||||
}
|
||||
|
||||
//entityLiving.setFire(50);
|
||||
entityLiving.attackEntityFrom(DamageSource.causePlayerDamage(par3EntityPlayer), 5 * i);
|
||||
//par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false);
|
||||
}
|
||||
|
||||
par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float) (2), false);
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class SpellLightningBolt extends HomSpell
|
||||
{
|
||||
|
@ -19,7 +18,6 @@ public class SpellLightningBolt extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(75, 200, 700, 700);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -41,7 +39,6 @@ public class SpellLightningBolt extends HomSpell
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new LightningBoltProjectile(par2World, par3EntityPlayer, 8, false));
|
||||
}
|
||||
|
||||
|
@ -68,7 +65,6 @@ public class SpellLightningBolt extends HomSpell
|
|||
double yCoord = par3EntityPlayer.posY;
|
||||
double zCoord = par3EntityPlayer.posZ;
|
||||
par2World.getWorldInfo().setRaining(true);
|
||||
//par2World.setRainStrength(1.0F);
|
||||
par2World.setRainStrength(1.0f);
|
||||
par2World.setThunderStrength(1.0f);
|
||||
par2World.getWorldInfo().setThunderTime(0);
|
||||
|
@ -76,7 +72,6 @@ public class SpellLightningBolt extends HomSpell
|
|||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
//PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, PacketHandler.getCustomParticlePacket("mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F));
|
||||
SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + itemRand.nextFloat() - itemRand.nextFloat(), yCoord + itemRand.nextFloat() - itemRand.nextFloat(), zCoord + itemRand.nextFloat() - itemRand.nextFloat(), 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
@ -132,7 +127,6 @@ public class SpellLightningBolt extends HomSpell
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new LightningBoltProjectile(par2World, par3EntityPlayer, 8, true));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -16,10 +15,10 @@ 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.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class SpellTeleport extends HomSpell
|
||||
{
|
||||
|
@ -29,7 +28,6 @@ public class SpellTeleport extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(500, 300, 500, 1000);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,7 +92,6 @@ public class SpellTeleport extends HomSpell
|
|||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
//PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, PacketHandler.getCustomParticlePacket("portal", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat()));
|
||||
SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "portal", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 2, itemRand.nextFloat(), itemRand.nextFloat(), itemRand.nextFloat());
|
||||
}
|
||||
|
||||
|
@ -120,7 +117,6 @@ public class SpellTeleport extends HomSpell
|
|||
{
|
||||
int d0 = 3;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
|
||||
//axisalignedbb.maxY = (double)this.worldObj.getHeight();
|
||||
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
|
@ -135,9 +131,7 @@ public class SpellTeleport extends HomSpell
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
SpellTeleport.teleportRandomly(entityLiving, 128);
|
||||
//entityLiving.attackEntityFrom(DamageSource.inFire, 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,7 +172,6 @@ public class SpellTeleport extends HomSpell
|
|||
}
|
||||
|
||||
return true;
|
||||
//return SpellTeleport.teleportTo(entityLiving, d0, d1, d2,x,y,z);
|
||||
}
|
||||
|
||||
private static boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, double lastX, double lastY, double lastZ)
|
||||
|
@ -248,9 +241,6 @@ public class SpellTeleport extends HomSpell
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
@ -262,8 +252,6 @@ public class SpellTeleport extends HomSpell
|
|||
if (entityLiving != null && entityLiving instanceof EntityPlayerMP)
|
||||
{
|
||||
EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving;
|
||||
|
||||
//if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == entityLiving.worldObj)
|
||||
if (entityplayermp.worldObj == entityLiving.worldObj)
|
||||
{
|
||||
EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, x, y, z, 5.0F);
|
||||
|
@ -274,10 +262,7 @@ public class SpellTeleport extends HomSpell
|
|||
{
|
||||
entityLiving.mountEntity((Entity) null);
|
||||
}
|
||||
|
||||
entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
||||
// this.getThrower().fallDistance = 0.0F;
|
||||
// this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -12,11 +12,10 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class SpellWateryGrave extends HomSpell
|
||||
{
|
||||
|
@ -26,7 +25,6 @@ public class SpellWateryGrave extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(250, 350, 500, 750);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -95,7 +93,6 @@ public class SpellWateryGrave extends HomSpell
|
|||
|
||||
int d0 = 3;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
|
||||
//axisalignedbb.maxY = (double)this.worldObj.getHeight();
|
||||
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
|
@ -128,7 +125,6 @@ public class SpellWateryGrave extends HomSpell
|
|||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
//PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, PacketHandler.getCustomParticlePacket("mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F));
|
||||
SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,21 +1,18 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.simple;
|
||||
|
||||
import ibxm.Player;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class SpellWindGust extends HomSpell
|
||||
{
|
||||
|
@ -25,7 +22,6 @@ public class SpellWindGust extends HomSpell
|
|||
{
|
||||
super();
|
||||
this.setEnergies(300, 400, 300, 500);
|
||||
//this.setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +43,6 @@ public class SpellWindGust extends HomSpell
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new WindGustProjectile(par2World, par3EntityPlayer, 8));
|
||||
}
|
||||
|
||||
|
@ -77,7 +72,6 @@ public class SpellWindGust extends HomSpell
|
|||
double zCoord = par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance;
|
||||
float d0 = 0.5f;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX - 0.5 + Math.sin(yaw) * Math.cos(pitch) * (-distance), par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance, par3EntityPlayer.posZ - 0.5 + Math.cos(yaw) * Math.cos(pitch) * distance, par3EntityPlayer.posX + Math.sin(yaw) * Math.cos(pitch) * (-distance) + 0.5, par3EntityPlayer.posY + par3EntityPlayer.getEyeHeight() + Math.sin(-pitch) * distance + 1, par3EntityPlayer.posZ + Math.cos(yaw) * Math.cos(pitch) * distance + 0.5).expand(d0, d0, d0);
|
||||
//axisalignedbb.maxY = (double)this.worldObj.getHeight();
|
||||
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
|
@ -92,24 +86,15 @@ public class SpellWindGust extends HomSpell
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//entityLiving.setFire(50);
|
||||
//entityLiving.attackEntityFrom(DamageSource.causePlayerDamage(par3EntityPlayer), 5*i);
|
||||
//entityLiving.setVelocity(Math.sin(-yaw)*2, 2, Math.cos(yaw)*2);
|
||||
entityLiving.motionX = Math.sin(-yaw) * 2;
|
||||
entityLiving.motionY = 2;
|
||||
entityLiving.motionZ = Math.cos(yaw) * 2;
|
||||
//par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false);
|
||||
}
|
||||
|
||||
//par2World.createExplosion(par3EntityPlayer, xCoord, yCoord, zCoord, (float)(1), false);
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F);
|
||||
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -139,11 +124,9 @@ public class SpellWindGust extends HomSpell
|
|||
par3EntityPlayer.motionX = vec.xCoord * wantedVelocity;
|
||||
par3EntityPlayer.motionY = vec.yCoord * wantedVelocity;
|
||||
par3EntityPlayer.motionZ = vec.zCoord * wantedVelocity;
|
||||
//PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(xVel, yVel, zVel), (Player) par3EntityPlayer);
|
||||
SpellHelper.setPlayerSpeedFromServer(par3EntityPlayer, xVel, yVel, zVel);
|
||||
par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
par3EntityPlayer.fallDistance = 0;
|
||||
//par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false);
|
||||
double xCoord = par3EntityPlayer.posX;
|
||||
double yCoord = par3EntityPlayer.posY;
|
||||
double zCoord = par3EntityPlayer.posZ;
|
||||
|
@ -173,7 +156,6 @@ public class SpellWindGust extends HomSpell
|
|||
|
||||
int d0 = 3;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
|
||||
//axisalignedbb.maxY = (double)this.worldObj.getHeight();
|
||||
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
double xCoord = par3EntityPlayer.posX;
|
||||
|
@ -198,17 +180,10 @@ public class SpellWindGust extends HomSpell
|
|||
double posZDif = entityLiving.posZ - par3EntityPlayer.posZ;
|
||||
double distance2 = Math.pow(posXDif, 2) + Math.pow(posYDif, 2) + Math.pow(posZDif, 2);
|
||||
double distance = Math.sqrt(distance2);
|
||||
//entityLiving.setVelocity(posXDif*wantedVel/distance, posYDif*wantedVel/distance, posZDif*wantedVel/distance);
|
||||
entityLiving.motionX = posXDif * wantedVel / distance;
|
||||
entityLiving.motionY = posYDif * wantedVel / distance;
|
||||
entityLiving.motionZ = posZDif * wantedVel / distance;
|
||||
//entityLiving.setFire(50);
|
||||
//entityLiving.attackEntityFrom(DamageSource.causePlayerDamage(par3EntityPlayer), 5*i);
|
||||
//par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false);
|
||||
}
|
||||
|
||||
//par2World.createExplosion(par3EntityPlayer, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (float)(2), false);
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
SpellHelper.sendParticleToAllAround(par2World, xCoord, yCoord, zCoord, 30, par2World.provider.dimensionId, "mobSpell", xCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, yCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, zCoord + (itemRand.nextFloat() - itemRand.nextFloat()) * 3, 0.0F, 0.410F, 1.0F);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue