package com.hbm.explosion; import java.util.HashSet; import java.util.List; import java.util.Random; import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraft.world.WorldSettings.GameType; import net.minecraftforge.common.util.ForgeDirection; import com.hbm.blocks.DecoBlockAlt; import com.hbm.blocks.ModBlocks; import com.hbm.entity.EntityMirv; import com.hbm.entity.EntityNukeCloudSmall; public class ExplosionNukeGeneric { private final static Random field_149933_a = new Random(); public static void detonateTestBomb(World world, int x, int y, int z, int bombStartStrength) { int r = bombStartStrength; int r2 = r*r; int r22 = r2/2; for (int xx = -r; xx < r; xx++) { int X = xx+x; int XX = xx*xx; for (int yy = -r; yy < r; yy++) { int Y = yy+y; int YY = XX+yy*yy; for (int zz = -r; zz < r; zz++) { int Z = zz+z; int ZZ = YY+zz*zz; if(r22 >= 25) { if (ZZ= y) destruction(world, X, Y, Z); } } else { if (ZZ= y) destruction(world, X, Y, Z); } } } } } for (int xx = -r; xx < r; xx++) { int X = xx+x; int XX = xx*xx; for (int yy = -r; yy < r; yy++) { int Y = yy+y; int YY = XX+yy*yy*50; for (int zz = -r; zz < r; zz++) { int Z = zz+z; int ZZ = YY+zz*zz; if (ZZ 0) isOccupied = true; double d11 = (1.0D - d4);// * d10; if(!(entity instanceof EntityPlayerMP) || (entity instanceof EntityPlayerMP && ((EntityPlayerMP)entity).theItemInWorldManager.getGameType() != GameType.CREATIVE)) { entity.attackEntityFrom(DamageSource.generic, ((int)((d11 * d11 + d11) / 2.0D * 8.0D * bombStartStrength + 1.0D))); entity.setFire(30); double d8 = EnchantmentProtection.func_92092_a(entity, d11); entity.motionX += d5 * d8; entity.motionY += d6 * d8; entity.motionZ += d7 * d8; } } } } bombStartStrength = (int)f; } public static void vapor(World world, int x, int y, int z, int bombStartStrength) { int r = bombStartStrength * 2; int r2 = r*r; int r22 = r2/2; for (int xx = -r; xx < r; xx++) { int X = xx+x; int XX = xx*xx; for (int yy = -r; yy < r; yy++) { int Y = yy+y; int YY = XX+yy*yy; for (int zz = -r; zz < r; zz++) { int Z = zz+z; int ZZ = YY+zz*zz; if (ZZ