Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void attackEntity(Entity par1Entity, float par2) {
- final MinecraftServer mcserver = FMLCommonHandler.instance().getMinecraftServerInstance();
- if (this.godState == 0 && XCEntityGod.evilState == 0 || this.godState == 1 && XCEntityGod.evilState == 0 || this.godState == 3 && XCEntityGod.evilState == 0 || this.godState == 4 && XCEntityGod.evilState == 0 || this.godState == 6) {
- this.fallDistance = 0.0F;
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.65D);
- }
- if (par2 < 50F && this.rand.nextInt(95) == 0 && (this.godState == 0 || this.godState == 6) && XCEntityGod.evilState == 0 && this.getHealth() > 1800) {
- this.godState = 1;
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:mob.charge", 2.2F, 1.0F / (this.rand.nextFloat() * 0.4F + 0.8F));
- }
- if (this.godState == 1 && XCEntityGod.evilState == 0) {
- final double d = par1Entity.posX - this.posX;
- final double d14 = par1Entity.posZ - this.posZ;
- final float f1 = MathHelper.sqrt_double(d * d + d14 * d14);
- this.chargeTime++;
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.2D);
- final double d40 = this.rand.nextGaussian() * 0.02D;
- final double d54 = this.rand.nextGaussian() * 0.02D;
- final double d60 = this.rand.nextGaussian() * 0.02D;
- final double d63 = 20D;
- for (int l12 = 0; l12 < 30; l12++) {
- Minecraft.getMinecraft().effectRenderer.addEffect(new XCEntityPortalCelestialFX(this.worldObj, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d40 * d63, this.posY + this.rand.nextFloat() * this.height - d54 * d63, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d60 * d63, d40, d54, d60));
- }
- }
- if (this.chargeTime >= 40 && this.godState == 1 && evilState == 0) {
- final byte byte0 = 3;
- for (int l1 = 0; l1 < byte0; l1++) {
- final double d15 = par1Entity.posX - this.posX;
- final double d31 = par1Entity.posZ - this.posZ;
- final XCEntityDivineMissile entityarrow2_2 = new XCEntityDivineMissile(this.worldObj, this);
- entityarrow2_2.posY += 2.3999999761581421D;
- final double d55 = par1Entity.posY + par1Entity.getEyeHeight() - 0.40000000298023225D - entityarrow2_2.posY;
- final float f8 = MathHelper.sqrt_double(d15 * d15 + d31 * d31) * 0.0F;
- this.worldObj.playSoundAtEntity(this, "mob.ghast.fireball", 0.9F, 0.9F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.worldObj.playSoundAtEntity(this, "random.fizz", 0.9F, 0.9F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.worldObj.spawnEntityInWorld(entityarrow2_2);
- entityarrow2_2.setThrowableHeading(d15, d55 + f8, d31, 0.62F, -10F);
- }
- this.worldObj.playSoundAtEntity(this, "mob.ghast.fireball", 0.6F, 0.3F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.godState = 0;
- this.chargeTime = 0;
- }
- if (par2 < 50F && this.rand.nextInt(210) == 0 && (this.godState == 0 || this.godState == 6) && evilState == 0 && this.getHealth() > 1800) {
- this.godState = 2;
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:mob.fly", 1.2F, 1.0F / (this.rand.nextFloat() * 0.4F + 0.8F));
- }
- if (this.godState == 2 && this.chargeTime < 30 && evilState == 0) {
- this.motionY = 0.155D;
- this.chargeTime++;
- final double d1 = this.rand.nextGaussian() * 0.02D;
- final double d16 = this.rand.nextGaussian() * 0.02D;
- final double d32 = this.rand.nextGaussian() * 0.02D;
- final double d44 = 10D;
- for (int j10 = 0; j10 < 10; j10++) {
- Minecraft.getMinecraft().effectRenderer.addEffect(new XCEntityChargeFX(this.worldObj, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d1 * d44, this.posY + this.rand.nextFloat() * this.height - d16 * d44, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d32 * d44, d1, d16, d32));
- }
- }
- if (this.godState == 2 && this.chargeTime >= 30 && evilState == 0) {
- this.motionX = 0.0D;
- this.motionY = 0.0D;
- this.motionZ = 0.0D;
- this.fireRate++;
- }
- if (this.godState == 2 && this.fireRate >= 6 && this.tirNumber < 5 && evilState == 0) {
- final double d2 = par1Entity.posX - this.posX;
- final double d17 = par1Entity.posZ - this.posZ;
- final float f2 = MathHelper.sqrt_double(d2 * d2 + d17 * d17);
- final XCEntityDivineMissile entityarrow2 = new XCEntityDivineMissile(this.worldObj, this);
- entityarrow2.posY += 2.3999999761581421D;
- final double d45 = par1Entity.posY + par1Entity.getEyeHeight() - 0.40000000298023225D - entityarrow2.posY;
- final float f6 = MathHelper.sqrt_double(d2 * d2 + d17 * d17) * 0.0F;
- this.worldObj.playSoundAtEntity(this, "mob.ghast.fireball", 0.9F, 0.9F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.worldObj.playSoundAtEntity(this, "random.fizz", 0.9F, 0.9F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.worldObj.spawnEntityInWorld(entityarrow2);
- entityarrow2.setThrowableHeading(d2, d45 + f6, d17, 0.62F, 1.0F);
- this.tirNumber++;
- this.fireRate = 0;
- }
- if (this.godState == 2 && this.tirNumber >= 5 && evilState == 0) {
- this.motionY = -0.14999999999999999D;
- this.fallDistance = 0.0F;
- }
- if (this.onGround && this.godState == 2 && this.tirNumber >= 5 && evilState == 0) {
- this.tirNumber = 0;
- this.godState = 0;
- this.chargeTime = 0;
- this.fireRate = 0;
- this.fallDistance = 0.0F;
- }
- if (par2 < 50F && this.rand.nextInt(190) == 1 && (this.godState == 0 || this.godState == 6) && evilState == 0 && this.getHealth() > 1800) {
- this.godState = 3;
- this.worldObj.playSoundAtEntity(this, "mob.ghast.fireball", 1.3F, 0.4F / (this.rand.nextFloat() * 0.4F + 0.8F));
- }
- if (this.godState == 3 && evilState == 0) {
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.01D);
- final double d3 = this.rand.nextGaussian() * 0.02D;
- final double d18 = this.rand.nextGaussian() * 0.02D;
- final double d33 = this.rand.nextGaussian() * 0.02D;
- final double d46 = 10D;
- for (int k10 = 0; k10 < 10; k10++) {
- Minecraft.getMinecraft().effectRenderer.addEffect(new XCEntityCharge2FX(this.worldObj, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d3 * d46, this.posY + this.rand.nextFloat() * this.height - d18 * d46, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d33 * d46, d3, d18, d33));
- }
- this.chargeTime++;
- }
- if (this.godState == 3 && this.chargeTime >= 20 && evilState == 0) {
- this.fireRate++;
- }
- if (this.godState == 3 && this.chargeTime >= 20 && this.fireRate >= 4 && evilState == 0) {
- final int i = this.rand.nextInt(10) - this.rand.nextInt(10);
- final int i2 = this.rand.nextInt(10) - this.rand.nextInt(10);
- this.fireRate = 0;
- final double d19 = par1Entity.posX - this.posX;
- final double d34 = par1Entity.posZ - this.posZ;
- this.worldObj.createExplosion(this, this.posX + i, this.posY + 2D, this.posZ + i2, 1.0F, this.hasAttacked);
- this.tirNumber++;
- }
- if (this.godState == 3 && this.tirNumber == 25 && evilState == 0) {
- this.godState = 0;
- this.tirNumber = 0;
- this.chargeTime = 0;
- this.fireRate = 0;
- }
- if (par2 < 50F && this.rand.nextInt(100) == 1 && this.godState == 0 && evilState == 0 && this.getHealth() > 1800) {
- this.godState = 4;
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:mob.chargespeed", 2.2F, 1.0F / (this.rand.nextFloat() * 0.8F + 1.2F));
- }
- if (this.godState == 4 && evilState == 0) {
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.4D);
- this.igniteTime++;
- this.chargeTime++;
- final double d4 = this.rand.nextGaussian() * 0.02D;
- final double d20 = this.rand.nextGaussian() * 0.02D;
- final double d35 = this.rand.nextGaussian() * 0.02D;
- final double d47 = 10D;
- for (int l10 = 0; l10 < 10; l10++) {
- Minecraft.getMinecraft().effectRenderer.addEffect(new XCEntityChargeFX(this.worldObj, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d4 * d47, this.posY + this.rand.nextFloat() * this.height - d20 * d47, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d35 * d47, d4, d20, d35));
- }
- }
- if (this.godState == 4 && this.igniteTime >= 60 && this.chargeTime >= 60 && evilState == 0) {
- final double d5 = par1Entity.posX - this.posX;
- final double d21 = par1Entity.posZ - this.posZ;
- final float f3 = MathHelper.sqrt_double(d5 * d5 + d21 * d21);
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:random.bow", 1.5F, 0.43F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.motionX = d5 / f3 * 0.5D * 3.400000011920929D + this.motionX * 0.10000000298023223D;
- this.motionZ = d21 / f3 * 0.5D * 3.400000011920929D + this.motionZ * 0.10000000298023223D;
- this.motionY = 0.19000000059604644D;
- for (int i7 = 0; i7 < 20; i7++) {
- final double d48 = this.rand.nextGaussian() * 0.02D;
- final double d59 = this.rand.nextGaussian() * 0.02D;
- final double d62 = this.rand.nextGaussian() * 0.02D;
- final double d64 = 10D;
- this.worldObj.spawnParticle("explode", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d48 * d64, this.posY + this.rand.nextFloat() * this.height - d59 * d64, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d62 * d64, d48, d59, d62);
- }
- this.godState = 6;
- this.igniteTime = 60;
- }
- if (this.godState == 6 && evilState == 0) {
- this.igniteTime = 60;
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
- this.speedTime++;
- }
- if (this.godState == 6 && this.speedTime >= 45 && evilState == 0) {
- this.igniteTime = 0;
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.65D);
- this.speedTime = 0;
- this.godState = 0;
- }
- if (par2 < 12F && this.rand.nextInt(87) == 4 && (this.godState == 0 || this.godState == 6) && evilState == 0 && this.getHealth() > 1800 && this.onGround) {
- for (int j = 0; j < 20; j++) {
- final double d12 = this.rand.nextGaussian() * 0.02D;
- final double d28 = this.rand.nextGaussian() * 0.02D;
- final double d41 = this.rand.nextGaussian() * 0.02D;
- final double d56 = 10D;
- this.worldObj.spawnParticle("explode", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d12 * d56, this.posY + this.rand.nextFloat() * this.height - d28 * d56, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d41 * d56, d12, d28, d41);
- }
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:random.bow", 1.5F, 0.43F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.godState = 5;
- final double d6 = par1Entity.posX - this.posX;
- final double d22 = par1Entity.posZ - this.posZ;
- final float f4 = MathHelper.sqrt_double(d6 * d6 + d22 * d22);
- this.motionX = d6 / f4 * 0.5D * 0.40000001192092893D + this.motionX * 0.50000000298023228D;
- this.motionZ = d22 / f4 * 0.5D * 0.40000001192092893D + this.motionZ * 0.50000000298023228D;
- this.motionY = 1.0000000596046448D;
- this.fallDistance = 0.0F;
- }
- if (this.godState == 5 && evilState == 0) {
- this.chargeTime++;
- this.fallDistance = 0.0F;
- }
- if (this.godState == 5 && this.onGround && this.chargeTime > 5 && evilState == 0) {
- final int k = this.rand.nextInt(10) - this.rand.nextInt(10);
- final int j2 = this.rand.nextInt(10) - this.rand.nextInt(10);
- final int k3 = this.rand.nextInt(10) - this.rand.nextInt(10);
- final int l4 = this.rand.nextInt(10) - this.rand.nextInt(10);
- final int i6 = this.rand.nextInt(10) - this.rand.nextInt(10);
- final int j7 = this.rand.nextInt(10) - this.rand.nextInt(10);
- final int j8 = MathHelper.floor_double(this.posX);
- final int j9 = MathHelper.floor_double(this.boundingBox.minY);
- final int i11 = MathHelper.floor_double(this.posZ);
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, j8 + k, j9, i11 + j2));
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, j8 + k3, j9, i11 + l4));
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, j8 + i6, j9, i11 + j7));
- this.godState = 0;
- this.chargeTime = 0;
- this.fallDistance = 0.0F;
- }
- if (this.getHealth() <= 3000 && this.actionStop == 0 && (this.godState == 0 || this.godState == 6)) {
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.0D);
- this.motionX = 0.0D;
- this.motionZ = 0.0D;
- for (int l = 0; l < 20; l++) {
- final double d13 = this.rand.nextGaussian() * 0.02D;
- final double d29 = this.rand.nextGaussian() * 0.02D;
- final double d42 = this.rand.nextGaussian() * 0.02D;
- final double d57 = 10D;
- this.worldObj.spawnParticle("explode", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d13 * d57, this.posY + this.rand.nextFloat() * this.height - d29 * d57, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d42 * d57, d13, d29, d42);
- }
- this.chargeTime++;
- this.actionStop = 1;
- this.godState = 9;
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:mob.god.godphase", 6.5F, 1.0F / (this.rand.nextFloat() * 0.9F + 1.1F));
- }
- if (this.godState == 9 && this.actionStop == 1) {
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.0D);
- this.motionX = 0.0D;
- this.motionZ = 0.0D;
- this.chargeTime++;
- final double d7 = this.rand.nextGaussian() * 0.02D;
- final double d23 = this.rand.nextGaussian() * 0.02D;
- final double d36 = this.rand.nextGaussian() * 0.02D;
- final double d49 = 10D;
- this.worldObj.spawnParticle("explode", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d7 * d49, this.posY + this.rand.nextFloat() * this.height - d23 * d49, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d36 * d49, d7, d23, d36);
- this.chargeTime++;
- }
- if (this.godState == 9 && this.actionStop == 1 && this.chargeTime >= 80) {
- final boolean flag = true;
- final XCEntityGodProtector entitysanctuairegardien = new XCEntityGodProtector(this.worldObj);
- final XCEntityGodProtector entitysanctuairegardien1 = new XCEntityGodProtector(this.worldObj);
- entitysanctuairegardien.setLocationAndAngles(this.posX + 3D, this.posY + 0.5D, this.posZ, this.rand.nextFloat() * 360F, 0.0F);
- this.worldObj.spawnEntityInWorld(entitysanctuairegardien);
- entitysanctuairegardien1.setLocationAndAngles(this.posX - 3D, this.posY + 1.5D, this.posZ, this.rand.nextFloat() * 360F, 0.0F);
- this.worldObj.spawnEntityInWorld(entitysanctuairegardien1);
- final double d30 = this.rand.nextGaussian() * 0.02D;
- final double d43 = this.rand.nextGaussian() * 0.02D;
- final double d58 = this.rand.nextGaussian() * 0.02D;
- final double d61 = 10D;
- this.worldObj.spawnParticle("explode", this.posX + 3D + this.rand.nextFloat() * this.width * 2.0F - this.width - d30 * d61, this.posY + this.rand.nextFloat() * this.height - d43 * d61, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d58 * d61, d30, d43, d58);
- this.worldObj.spawnParticle("explode", this.posX - 3D + this.rand.nextFloat() * this.width * 2.0F - this.width - d30 * d61, this.posY + this.rand.nextFloat() * this.height - d43 * d61, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d58 * d61, d30, d43, d58);
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:random.old_explode", 0.8F, 1.43F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.chargeTime = 0;
- this.actionStop = 2;
- this.godState = 7;
- }
- if (this.godState == 7 && this.chargeTime < 30) {
- this.chargeTime++;
- this.motionY = 0.19500000000000001D;
- }
- if (this.godState == 7 && this.chargeTime >= 30) {
- this.motionX = 0.0D;
- this.motionY = 0.0D;
- this.motionZ = 0.0D;
- final double d8 = this.rand.nextGaussian() * 0.02D;
- final double d24 = this.rand.nextGaussian() * 0.02D;
- final double d37 = this.rand.nextGaussian() * 0.02D;
- final double d50 = 20D;
- for (int j11 = 0; j11 < 30; j11++) {
- Minecraft.getMinecraft().effectRenderer.addEffect(new XCEntityPortalCelestialFX(this.worldObj, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d8 * d50, this.posY + this.rand.nextFloat() * this.height - d24 * d50, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d37 * d50, d8, d24, d37));
- }
- this.fireRate++;
- }
- if (this.godState == 7 && this.fireRate >= 50) {
- final int i1 = this.rand.nextInt(30) - this.rand.nextInt(30);
- final int k2 = this.rand.nextInt(30) - this.rand.nextInt(30);
- final int l3 = this.rand.nextInt(30) - this.rand.nextInt(30);
- final int i5 = this.rand.nextInt(30) - this.rand.nextInt(30);
- final int j6 = this.rand.nextInt(30) - this.rand.nextInt(30);
- final int k7 = this.rand.nextInt(30) - this.rand.nextInt(30);
- final int k8 = MathHelper.floor_double(this.posX);
- final int k9 = MathHelper.floor_double(this.boundingBox.minY);
- final int k11 = MathHelper.floor_double(this.posZ);
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, k8 + i1, k9 - 4, k11 + k2));
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, k8 + l3, k9 - 4, k11 + i5));
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, k8 + j6, k9 - 4, k11 + k7));
- this.fireRate = 0;
- this.tirNumber++;
- }
- if (this.godState == 7 && this.tirNumber >= 5) {
- this.tirNumber = 0;
- this.fireRate = 0;
- this.godState = 8;
- this.chargeTime = 0;
- }
- if (this.godState == 8) {
- this.motionX = 0.0D;
- this.motionZ = 0.0D;
- this.motionY = 0.0D;
- this.chargeTime++;
- }
- if (this.godState == 8 && this.chargeTime >= 20) {
- this.fireRate++;
- }
- if (this.godState == 8 && this.chargeTime >= 20 && this.fireRate >= 2) {
- final double d9 = par1Entity.posX - this.posX;
- final double d25 = par1Entity.posZ - this.posZ;
- final float f5 = MathHelper.sqrt_double(d9 * d9 + d25 * d25);
- final XCEntityDivineMissile entityarrow2_1 = new XCEntityDivineMissile(this.worldObj, this);
- entityarrow2_1.posY += 2.3999999761581421D;
- final double d51 = par1Entity.posY + par1Entity.getEyeHeight() - 0.40000000298023225D - entityarrow2_1.posY;
- final float f7 = MathHelper.sqrt_double(d9 * d9 + d25 * d25) * 0.0F;
- this.worldObj.playSoundAtEntity(this, "mob.ghast.fireball", 0.9F, 0.9F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.worldObj.playSoundAtEntity(this, "random.fizz", 0.9F, 0.9F / (this.rand.nextFloat() * 0.4F + 0.8F));
- this.worldObj.spawnEntityInWorld(entityarrow2_1);
- entityarrow2_1.setThrowableHeading(d9, d51 + f7, d25, 0.62F, 15F);
- this.tirNumber++;
- this.fireRate = 0;
- }
- if (this.godState == 8 && this.tirNumber >= 10) {
- this.motionY = -1.14999999999999999D;
- this.fallDistance = 0.0F;
- }
- if (this.onGround && this.godState == 8 && this.tirNumber >= 10) {
- this.tirNumber = 0;
- this.godState = 0;
- this.chargeTime = 0;
- this.fireRate = 0;
- this.fallDistance = 0.0F;
- }
- if (this.getHealth() <= 1800 && this.actionStop == 2 && this.godState == 0) {
- this.actionStop = 3;
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:mob.god.godevil", 7.5F, 1.0F / (this.rand.nextFloat() * 0.9F + 1.1F));
- }
- if (this.getHealth() <= 1800 && this.actionStop == 3 && this.godState == 0) {
- this.chargeTime++;
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.0D);
- this.motionX = 0.0D;
- this.motionY = 0.0D;
- this.motionZ = 0.0D;
- final double d10 = this.rand.nextGaussian() * 0.02D;
- final double d26 = this.rand.nextGaussian() * 0.02D;
- final double d38 = this.rand.nextGaussian() * 0.02D;
- final double d52 = 10D;
- for (int l11 = 0; l11 < 9; l11++) {
- this.worldObj.spawnParticle("largesmoke", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d10 * d52, this.posY + this.rand.nextFloat() * this.height - d26 * d52, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d38 * d52, d10, d26, d38);
- }
- }
- if (this.getHealth() <= 1800 && this.actionStop == 3 && this.chargeTime >= 100) {
- final boolean flag1 = true;
- final int l2 = MathHelper.floor_double(this.posX);
- final int i4 = MathHelper.floor_double(this.boundingBox.minY);
- final int j5 = MathHelper.floor_double(this.posZ);
- this.worldObj.createExplosion(this, this.posX, this.posY + 2D, this.posZ, 1.0F, flag1);
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, l2, i4 + 1, j5));
- final XCEntityReaper entitygoodzombie = new XCEntityReaper(this.worldObj);
- final XCEntityReaper entitygoodzombie1 = new XCEntityReaper(this.worldObj);
- final XCEntityReaper entitygoodzombie2 = new XCEntityReaper(this.worldObj);
- final XCEntityReaper entitygoodzombie3 = new XCEntityReaper(this.worldObj);
- final XCEntityReaper entitygoodzombie4 = new XCEntityReaper(this.worldObj);
- final XCEntityReaper entitygoodzombie5 = new XCEntityReaper(this.worldObj);
- final XCEntityReaper entitygoodzombie6 = new XCEntityReaper(this.worldObj);
- final XCEntityReaper entitygoodzombie7 = new XCEntityReaper(this.worldObj);
- entitygoodzombie.setLocationAndAngles(this.posX + 4D, this.posY + 0.5D, this.posZ, this.rand.nextFloat() * 360F, 0.0F);
- entitygoodzombie1.setLocationAndAngles(this.posX + 4D, this.posY + 0.5D, this.posZ + 4D, this.rand.nextFloat() * 360F, 0.0F);
- entitygoodzombie2.setLocationAndAngles(this.posX + 4D, this.posY + 0.5D, this.posZ - 4D, this.rand.nextFloat() * 360F, 0.0F);
- entitygoodzombie3.setLocationAndAngles(this.posX - 4D, this.posY + 0.5D, this.posZ, this.rand.nextFloat() * 360F, 0.0F);
- entitygoodzombie4.setLocationAndAngles(this.posX - 4D, this.posY + 0.5D, this.posZ + 4D, this.rand.nextFloat() * 360F, 0.0F);
- entitygoodzombie5.setLocationAndAngles(this.posX - 4D, this.posY + 0.5D, this.posZ - 4D, this.rand.nextFloat() * 360F, 0.0F);
- entitygoodzombie6.setLocationAndAngles(this.posX, this.posY + 0.5D, this.posZ + 4D, this.rand.nextFloat() * 360F, 0.0F);
- entitygoodzombie7.setLocationAndAngles(this.posX, this.posY + 0.5D, this.posZ - 4D, this.rand.nextFloat() * 360F, 0.0F);
- this.worldObj.spawnEntityInWorld(entitygoodzombie);
- this.worldObj.spawnEntityInWorld(entitygoodzombie1);
- this.worldObj.spawnEntityInWorld(entitygoodzombie2);
- this.worldObj.spawnEntityInWorld(entitygoodzombie3);
- this.worldObj.spawnEntityInWorld(entitygoodzombie4);
- this.worldObj.spawnEntityInWorld(entitygoodzombie5);
- this.worldObj.spawnEntityInWorld(entitygoodzombie6);
- this.worldObj.spawnEntityInWorld(entitygoodzombie7);
- this.worldObj.playSoundAtEntity(this, "xtracraftmod:random.old_explode", 0.8F, 1.43F / (this.rand.nextFloat() * 0.4F + 0.8F));
- for (int i13 = 0; i13 < 6; i13++) {
- final double d65 = this.rand.nextGaussian() * 0.02D;
- final double d66 = this.rand.nextGaussian() * 0.02D;
- final double d67 = this.rand.nextGaussian() * 0.02D;
- final double d68 = 10D;
- this.worldObj.spawnParticle("largesmoke", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d65 * d68, this.posY + this.rand.nextFloat() * this.height - d66 * d68, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d67 * d68, d65, d66, d67);
- this.worldObj.spawnParticle("lava", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d65 * d68, this.posY + this.rand.nextFloat() * this.height - d66 * d68, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d67 * d68, d65, d66, d67);
- this.worldObj.spawnParticle("smoke", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d65 * d68, this.posY + this.rand.nextFloat() * this.height - d66 * d68, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d67 * d68, d65, d66, d67);
- this.worldObj.spawnParticle("explode", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d65 * d68, this.posY + this.rand.nextFloat() * this.height - d66 * d68, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d67 * d68, d65, d66, d67);
- this.worldObj.spawnParticle("flame", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d65 * d68, this.posY + this.rand.nextFloat() * this.height - d66 * d68, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d67 * d68, d65, d66, d67);
- }
- this.chargeTime = 0;
- XCEntityGod.evilState = 1;
- this.actionStop = 4;
- }
- if (XCEntityGod.evilState == 1) {
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.7D);
- final double d11 = this.rand.nextGaussian() * 0.02D;
- final double d27 = this.rand.nextGaussian() * 0.02D;
- final double d39 = this.rand.nextGaussian() * 0.02D;
- final double d53 = 10D;
- for (int i = 0; i < 3; i++) {
- this.worldObj.spawnParticle("largesmoke", this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width - d11 * d53, this.posY + this.rand.nextFloat() * this.height - d27 * d53, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width - d39 * d53, d11, d27, d39);
- }
- }
- if (evilState == 1 && this.rand.nextInt(40) == 0) {
- final int j1 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int i3 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int j4 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int k5 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int k6 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int l7 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int l8 = MathHelper.floor_double(this.posX);
- final int l9 = MathHelper.floor_double(this.boundingBox.minY);
- final int j12 = MathHelper.floor_double(this.posZ);
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, l8 + j1, l9 - 3, j12 + i3));
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, l8 + j4, l9 - 3, j12 + k5));
- this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, l8 + k6, l9 - 3, j12 + l7));
- }
- if (evilState == 1 && this.rand.nextInt(50) == 1) {
- final int k1 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int j3 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int k4 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int l5 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int l6 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int i8 = this.rand.nextInt(15) - this.rand.nextInt(15);
- final int i9 = MathHelper.floor_double(this.posX);
- final int i10 = MathHelper.floor_double(this.boundingBox.minY);
- final int k12 = MathHelper.floor_double(this.posZ);
- this.worldObj.createExplosion(this, this.posX + k1, this.posY + 2D, this.posZ + j3, 1.0F, this.hasAttacked);
- this.worldObj.createExplosion(this, this.posX + k4, this.posY + 2D, this.posZ + l5, 1.0F, this.hasAttacked);
- this.worldObj.createExplosion(this, this.posX + l6, this.posY + 2D, this.posZ + i8, 1.0F, this.hasAttacked);
- }
- super.attackEntity(par1Entity, par2);
- }
Advertisement
Add Comment
Please, Sign In to add comment