use of blusunrize.immersiveengineering.common.util.IEExplosion in project ImmersiveEngineering by BluSunrize.
the class EntityIEExplosive method onUpdate.
@Override
public void onUpdate() {
if (worldObj.isRemote && this.block == null)
this.getBlockSynced();
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.motionY -= 0.03999999910593033D;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
if (this.onGround) {
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
this.motionY *= -0.5D;
}
int newFuse = this.getFuse() - 1;
this.setFuse(newFuse);
if (newFuse-- <= 0) {
this.setDead();
if (!this.worldObj.isRemote) {
Explosion explosion = new IEExplosion(worldObj, this, posX, posY + (height / 16f), posZ, explosionPower, explosionFire, explosionSmoke).setDropChance(explosionDropChance);
if (!ForgeEventFactory.onExplosionStart(worldObj, explosion)) {
explosion.doExplosionA();
explosion.doExplosionB(true);
}
}
} else {
this.handleWaterMovement();
this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
}
}
Aggregations