use of mod.azure.doom.entity.tierheavy.MancubusEntity 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);
}
}
}
}
}
Aggregations