Search in sources :

Example 1 with DoomFireEntity

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

the class ArchvileEntity method conjureFangs.

private void conjureFangs(double x, double z, double maxY, double y, float yaw, int warmup) {
    BlockPos blockPos = new BlockPos(x, y, z);
    boolean bl = false;
    double d = 0.0D;
    do {
        BlockPos blockPos2 = blockPos.down();
        BlockState blockState = this.world.getBlockState(blockPos2);
        if (blockState.isSideSolidFullSquare(this.world, blockPos2, Direction.UP)) {
            if (!this.world.isAir(blockPos)) {
                BlockState blockState2 = this.world.getBlockState(blockPos);
                VoxelShape voxelShape = blockState2.getCollisionShape(this.world, blockPos);
                if (!voxelShape.isEmpty()) {
                    d = voxelShape.getMax(Direction.Axis.Y);
                }
            }
            bl = true;
            break;
        }
        blockPos = blockPos.down();
    } while (blockPos.getY() >= MathHelper.floor(maxY) - 1);
    if (bl) {
        DoomFireEntity fang = new DoomFireEntity(this.world, x, (double) blockPos.getY() + d, z, yaw, warmup, this, config.archvile_ranged_damage);
        fang.setFireTicks(age);
        fang.isInvisible();
        this.world.spawnEntity(fang);
    }
}
Also used : BlockState(net.minecraft.block.BlockState) VoxelShape(net.minecraft.util.shape.VoxelShape) DoomFireEntity(mod.azure.doom.entity.projectiles.entity.DoomFireEntity) BlockPos(net.minecraft.util.math.BlockPos)

Example 2 with DoomFireEntity

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

the class SummonerEntity method conjureFangs.

private void conjureFangs(double x, double z, double maxY, double y, float yaw, int warmup) {
    BlockPos blockPos = new BlockPos(x, y, z);
    boolean bl = false;
    double d = 0.0D;
    do {
        BlockPos blockPos2 = blockPos.down();
        BlockState blockState = this.world.getBlockState(blockPos2);
        if (blockState.isSideSolidFullSquare(this.world, blockPos2, Direction.UP)) {
            if (!this.world.isAir(blockPos)) {
                BlockState blockState2 = this.world.getBlockState(blockPos);
                VoxelShape voxelShape = blockState2.getCollisionShape(this.world, blockPos);
                if (!voxelShape.isEmpty()) {
                    d = voxelShape.getMax(Direction.Axis.Y);
                }
            }
            bl = true;
            break;
        }
        blockPos = blockPos.down();
    } while (blockPos.getY() >= MathHelper.floor(maxY) - 1);
    if (bl) {
        DoomFireEntity fang = new DoomFireEntity(this.world, x, (double) blockPos.getY() + d, z, yaw, warmup, this, config.summoner_ranged_damage);
        fang.setFireTicks(age);
        fang.isInvisible();
        this.world.spawnEntity(fang);
    }
}
Also used : BlockState(net.minecraft.block.BlockState) VoxelShape(net.minecraft.util.shape.VoxelShape) DoomFireEntity(mod.azure.doom.entity.projectiles.entity.DoomFireEntity) BlockPos(net.minecraft.util.math.BlockPos)

Example 3 with DoomFireEntity

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

the class IconofsinEntity method spawnFlames.

public void spawnFlames(double x, double z, double maxY, double y, float yaw, int warmup) {
    BlockPos blockPos = new BlockPos(x, y, z);
    boolean bl = false;
    double d = -0.75D;
    do {
        BlockPos blockPos2 = blockPos.down();
        BlockState blockState = this.world.getBlockState(blockPos2);
        if (blockState.isSideSolidFullSquare(this.world, blockPos2, Direction.UP)) {
            if (!this.world.isAir(blockPos)) {
                BlockState blockState2 = this.world.getBlockState(blockPos);
                VoxelShape voxelShape = blockState2.getCollisionShape(this.world, blockPos);
                if (!voxelShape.isEmpty()) {
                    d = voxelShape.getMax(Direction.Axis.Y);
                }
            }
            bl = true;
            break;
        }
        blockPos = blockPos.down();
    } while (blockPos.getY() >= MathHelper.floor(maxY) - 1);
    if (bl) {
        DoomFireEntity fang = new DoomFireEntity(this.world, x, (double) blockPos.getY() + d, z, yaw, warmup, this, config.icon_melee_damage);
        fang.setFireTicks(age);
        fang.isInvisible();
        fang.age = -150;
        this.world.spawnEntity(fang);
    }
}
Also used : BlockState(net.minecraft.block.BlockState) VoxelShape(net.minecraft.util.shape.VoxelShape) DoomFireEntity(mod.azure.doom.entity.projectiles.entity.DoomFireEntity) BlockPos(net.minecraft.util.math.BlockPos)

Example 4 with DoomFireEntity

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

the class MancubusEntity method spawnFlames.

public void spawnFlames(double x, double z, double maxY, double y, float yaw, int warmup) {
    BlockPos blockPos = new BlockPos(x, y, z);
    boolean bl = false;
    double d = -0.75D;
    do {
        BlockPos blockPos2 = blockPos.down();
        BlockState blockState = this.world.getBlockState(blockPos2);
        if (blockState.isSideSolidFullSquare(this.world, blockPos2, Direction.UP)) {
            if (!this.world.isAir(blockPos)) {
                BlockState blockState2 = this.world.getBlockState(blockPos);
                VoxelShape voxelShape = blockState2.getCollisionShape(this.world, blockPos);
                if (!voxelShape.isEmpty()) {
                    d = voxelShape.getMax(Direction.Axis.Y);
                }
            }
            bl = true;
            break;
        }
        blockPos = blockPos.down();
    } while (blockPos.getY() >= MathHelper.floor(maxY) - 1);
    if (bl) {
        DoomFireEntity fang = new DoomFireEntity(this.world, x, (double) blockPos.getY() + d, z, yaw, warmup, this, config.mancubus_ranged_damage);
        fang.setFireTicks(age);
        fang.isInvisible();
        this.world.spawnEntity(fang);
    }
}
Also used : BlockState(net.minecraft.block.BlockState) VoxelShape(net.minecraft.util.shape.VoxelShape) DoomFireEntity(mod.azure.doom.entity.projectiles.entity.DoomFireEntity) BlockPos(net.minecraft.util.math.BlockPos)

Example 5 with DoomFireEntity

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

the class DoomHunterEntity method spawnFlames.

public void spawnFlames(double x, double z, double maxY, double y, float yaw, int warmup) {
    BlockPos blockPos = new BlockPos(x, y, z);
    boolean bl = false;
    double d = -0.75D;
    do {
        BlockPos blockPos2 = blockPos.down();
        BlockState blockState = this.world.getBlockState(blockPos2);
        if (blockState.isSideSolidFullSquare(this.world, blockPos2, Direction.UP)) {
            if (!this.world.isAir(blockPos)) {
                BlockState blockState2 = this.world.getBlockState(blockPos);
                VoxelShape voxelShape = blockState2.getCollisionShape(this.world, blockPos);
                if (!voxelShape.isEmpty()) {
                    d = voxelShape.getMax(Direction.Axis.Y);
                }
            }
            bl = true;
            break;
        }
        blockPos = blockPos.down();
    } while (blockPos.getY() >= MathHelper.floor(maxY) - 1);
    if (bl) {
        DoomFireEntity fang = new DoomFireEntity(this.world, x, (double) blockPos.getY() + d, z, yaw, warmup, this, config.doomhunter_ranged_damage);
        fang.setFireTicks(age);
        fang.isInvisible();
        this.world.spawnEntity(fang);
    }
}
Also used : BlockState(net.minecraft.block.BlockState) VoxelShape(net.minecraft.util.shape.VoxelShape) DoomFireEntity(mod.azure.doom.entity.projectiles.entity.DoomFireEntity) BlockPos(net.minecraft.util.math.BlockPos)

Aggregations

DoomFireEntity (mod.azure.doom.entity.projectiles.entity.DoomFireEntity)6 BlockState (net.minecraft.block.BlockState)6 BlockPos (net.minecraft.util.math.BlockPos)6 VoxelShape (net.minecraft.util.shape.VoxelShape)6