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);
}
}
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);
}
}
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);
}
}
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);
}
}
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);
}
}
Aggregations