From a1021ae7e3f2357a541aaef8d8bde72044478bcd Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Sat, 18 Mar 2017 12:33:27 +1000 Subject: % Changed Mining Explosives to use the new ExplosionHandler. + Added a custom explosion which sets the world ablaze and will eventually support the custom mining mechanic. --- src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Java/gtPlusPlus/core/entity') diff --git a/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java b/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java index 89d25a728a..dabb12e44e 100644 --- a/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java +++ b/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java @@ -1,6 +1,7 @@ package gtPlusPlus.core.entity; import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.world.explosions.ExplosionHandler; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityTNTPrimed; import net.minecraft.nbt.NBTTagCompound; @@ -124,11 +125,15 @@ public class EntityPrimedMiningExplosive extends EntityTNTPrimed private void explode() { final float f = 20.0F; - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true); - this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); + + ExplosionHandler explode = new ExplosionHandler(); + explode.createExplosion(this.worldObj, this, this.posX, this.posY, this.posZ, f, true, true); + + /*this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true); this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); + this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true);*/ } /** -- cgit