Search in sources :

Example 1 with ArchvileEntity

use of mod.azure.doom.entity.tiersuperheavy.ArchvileEntity in project MCDoom by AzureDoom.

the class DoomFireEntity method tick.

public void tick() {
    super.tick();
    if (--this.warmup < 0) {
        if (!this.startedAttack) {
            this.world.sendEntityStatus(this, (byte) 4);
            this.startedAttack = true;
        }
        if (--this.ticksLeft < 0) {
            this.remove(Entity.RemovalReason.DISCARDED);
        }
    }
    if (this.isAlive() && world.getBlockState(this.getBlockPos().up()).isAir()) {
        world.setBlockState(this.getBlockPos().up(), AbstractFireBlock.getState(world, this.getBlockPos().up()));
    }
    List<Entity> list = this.world.getOtherEntities(this, new Box(this.getBlockPos().up()).expand(1D, 1D, 1D));
    for (int x = 0; x < list.size(); ++x) {
        Entity entity = (Entity) list.get(x);
        if (!(entity instanceof MancubusEntity) && !(entity instanceof ArchvileEntity) && !(entity instanceof IconofsinEntity) && !(entity instanceof DoomHunterEntity) && !(entity instanceof SummonerEntity) && !(entity instanceof MotherDemonEntity)) {
            double y = (double) (MathHelper.sqrt(entity.distanceTo(this)));
            if (y <= 1.0D) {
                if (entity.isAlive()) {
                    entity.damage(DamageSource.mobProjectile(entity, this.getOwner()), damage);
                    entity.setFireTicks(60);
                }
            }
        }
    }
}
Also used : SummonerEntity(mod.azure.doom.entity.tiersuperheavy.SummonerEntity) IconofsinEntity(mod.azure.doom.entity.tierboss.IconofsinEntity) ArchvileEntity(mod.azure.doom.entity.tiersuperheavy.ArchvileEntity) DoomHunterEntity(mod.azure.doom.entity.tiersuperheavy.DoomHunterEntity) Entity(net.minecraft.entity.Entity) MotherDemonEntity(mod.azure.doom.entity.tierboss.MotherDemonEntity) LivingEntity(net.minecraft.entity.LivingEntity) MancubusEntity(mod.azure.doom.entity.tierheavy.MancubusEntity) ArchvileEntity(mod.azure.doom.entity.tiersuperheavy.ArchvileEntity) MotherDemonEntity(mod.azure.doom.entity.tierboss.MotherDemonEntity) Box(net.minecraft.util.math.Box) MancubusEntity(mod.azure.doom.entity.tierheavy.MancubusEntity) IconofsinEntity(mod.azure.doom.entity.tierboss.IconofsinEntity) SummonerEntity(mod.azure.doom.entity.tiersuperheavy.SummonerEntity) DoomHunterEntity(mod.azure.doom.entity.tiersuperheavy.DoomHunterEntity)

Aggregations

IconofsinEntity (mod.azure.doom.entity.tierboss.IconofsinEntity)1 MotherDemonEntity (mod.azure.doom.entity.tierboss.MotherDemonEntity)1 MancubusEntity (mod.azure.doom.entity.tierheavy.MancubusEntity)1 ArchvileEntity (mod.azure.doom.entity.tiersuperheavy.ArchvileEntity)1 DoomHunterEntity (mod.azure.doom.entity.tiersuperheavy.DoomHunterEntity)1 SummonerEntity (mod.azure.doom.entity.tiersuperheavy.SummonerEntity)1 Entity (net.minecraft.entity.Entity)1 LivingEntity (net.minecraft.entity.LivingEntity)1 Box (net.minecraft.util.math.Box)1