use of net.minecraft.world.Explosion in project LogisticsPipes by RS485.
the class PipeMultiBlockTransportLogistics method handleTileReachedServer.
@Override
protected void handleTileReachedServer(LPTravelingItemServer arrivingItem, TileEntity tile, ForgeDirection dir) {
markChunkModified(tile);
if (tile instanceof LogisticsTileGenericPipe && ((LogisticsTileGenericPipe) tile).pipe instanceof CoreMultiBlockPipe) {
passToNextPipe(arrivingItem, tile);
return;
} else if (tile instanceof LogisticsTileGenericSubMultiBlock) {
List<LogisticsTileGenericPipe> masterTile = ((LogisticsTileGenericSubMultiBlock) tile).getMainPipe();
if (!masterTile.isEmpty()) {
if (masterTile.size() > 1) {
throw new UnsupportedOperationException();
}
passToNextPipe(arrivingItem, masterTile.get(0));
return;
}
}
Explosion explosion = new Explosion(this.getWorld(), null, this.getPipe().getX(), this.getPipe().getY(), this.getPipe().getZ(), 4.0F);
explosion.isFlaming = false;
explosion.isSmoking = true;
explosion.doExplosionB(true);
}
use of net.minecraft.world.Explosion 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);
}
}
use of net.minecraft.world.Explosion in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testOnDestroyedByExplosion.
@Test
public void testOnDestroyedByExplosion() {
FakeWorld world = FakeWorld.newWorld("TestOnDestroyedByExplosion");
world.setBlock(0, 0, 0, block);
((Tile) world.getTileEntity(0, 0, 0)).onDestroyedByExplosion(new Explosion(world, null, 0, 0, 0, 10));
}
use of net.minecraft.world.Explosion in project SecurityCraft by Geforce132.
the class BlockMine method newExplosion.
/**
* returns a new explosion. Does initiation (at time of writing Explosion is not finished)
*/
public Explosion newExplosion(Entity par1Entity, double par2, double par4, double par6, float par8, boolean par9, boolean par10, World par11World) {
Explosion explosion = new Explosion(par11World, par1Entity, par2, par4, par6, par8);
if (mod_SecurityCraft.configHandler.shouldSpawnFire) {
explosion.isFlaming = true;
} else {
explosion.isFlaming = false;
}
explosion.isSmoking = par10;
explosion.doExplosionA();
explosion.doExplosionB(true);
return explosion;
}
use of net.minecraft.world.Explosion in project SecurityCraft by Geforce132.
the class BlockMine method newExplosion.
/**
* returns a new explosion. Does initiation (at time of writing Explosion is not finished)
*/
public Explosion newExplosion(Entity par1Entity, double par2, double par4, double par6, float par8, boolean par9, boolean par10, World par11World) {
Explosion explosion = new Explosion(par11World, par1Entity, par2, par4, par6, par8);
if (mod_SecurityCraft.configHandler.shouldSpawnFire) {
explosion.isFlaming = true;
} else {
explosion.isFlaming = false;
}
explosion.isSmoking = par10;
explosion.doExplosionA();
explosion.doExplosionB(true);
return explosion;
}
Aggregations