Search in sources :

Example 1 with BarrelEntity

use of mod.azure.doom.entity.projectiles.BarrelEntity in project MCDoom by AzureDoom.

the class BarrelBlock method onExplosionDestroy.

public void onExplosionDestroy(World world, BlockPos pos, Explosion explosionIn) {
    if (!world.isClient) {
        BarrelEntity tntentity = new BarrelEntity(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, explosionIn.getCausingEntity());
        world.spawnEntity(tntentity);
    }
}
Also used : BarrelEntity(mod.azure.doom.entity.projectiles.BarrelEntity)

Example 2 with BarrelEntity

use of mod.azure.doom.entity.projectiles.BarrelEntity in project MCDoom by AzureDoom.

the class BarrelBlock method primeBlock.

private static void primeBlock(World world, BlockPos pos, LivingEntity igniter) {
    if (!world.isClient) {
        BarrelEntity tntEntity = new BarrelEntity(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, igniter);
        world.spawnEntity(tntEntity);
        world.playSound((PlayerEntity) null, tntEntity.getX(), tntEntity.getY(), tntEntity.getZ(), SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F);
    }
}
Also used : BarrelEntity(mod.azure.doom.entity.projectiles.BarrelEntity)

Aggregations

BarrelEntity (mod.azure.doom.entity.projectiles.BarrelEntity)2