package mcjty.deepresonance.boom;

import elec332.core.explosion.Elexplosion;
import elec332.core.util.BlockLoc;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
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 java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;

/**
 * Created by Elec332 on 13-8-2015.
 */
public class TestExplosion extends Elexplosion{
    public TestExplosion(World world, Entity entity, double x, double y, double z, float size) {
        super(world, entity, x, y, z, size);
    }

    @Override
    protected void preExplode() {
        damageEntities(getRadius(), 4.0f);
    }
}

@@ -106,16 +106,89 @@
 ockLoc;%0A
+import elec332.core.world.WorldHelper;%0Aimport net.minecraft.block.Block;%0A
 import n
@@ -215,16 +215,16 @@
 Entity;%0A
-
 import n
@@ -257,16 +257,50 @@
 Living;%0A
+import net.minecraft.init.Blocks;%0A
 import n
@@ -872,24 +872,24 @@
 Explode() %7B%0A
-
         dama
@@ -924,11 +924,1252 @@
 );%0A    %7D
+%0A%0A    protected void doExplode() %7B%0A        if(!this.getWorld().isRemote) %7B%0A            for(int x = (int)(-this.getRadius()); (float)x %3C this.getRadius(); ++x) %7B%0A                for(int y = (int)(-this.getRadius()); (float)y %3C this.getRadius(); ++y) %7B%0A                    for(int z = (int)(-this.getRadius()); (float)z %3C this.getRadius(); ++z) %7B%0A                        BlockLoc targetPosition = this.getLocation().copy().translate(new BlockLoc(x, y, z));%0A                        double dist = this.getLocation().distance(targetPosition);%0A                        if(dist %3C (double)this.getRadius()) %7B%0A                            Block block = WorldHelper.getBlockAt(this.getWorld(), targetPosition);%0A                            if(block != null && !block.isAir(this.getWorld(), targetPosition.xCoord, targetPosition.yCoord, targetPosition.zCoord) && block != Blocks.bedrock && (dist %3C (double)(this.getRadius() - 1.0F) %7C%7C (double)this.getWorld().rand.nextFloat() %3E 0.7D)) %7B%0A                                block.onBlockExploded(getWorld(), targetPosition.xCoord, targetPosition.yCoord, targetPosition.zCoord, this);%0A                            %7D%0A                        %7D%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A%0A    %7D
 %0A%7D%0A

Fix explosions?