use of net.minecraft.block.DoorBlock in project MCMOD-Industria by M-Marvin.
the class BlockBurnedBlock method scann.
@SuppressWarnings("deprecation")
public static int scann(World world, BlockPos pos, List<BlockPos> posList, int depth) {
if (depth < 8 && !posList.contains(pos)) {
int dist = 8;
posList.add(pos);
for (Direction d : Direction.values()) {
BlockPos scanPos = pos.relative(d);
BlockState scanState = world.getBlockState(scanPos);
if (canHoldBurnedBlocks(world, pos, scanState)) {
return depth + 1;
} else if ((scanState.isSolidRender(world, pos) || scanState.getBlock() instanceof FenceBlock || scanState.getBlock() instanceof TrapDoorBlock || scanState.getBlock() instanceof DoorBlock) && !scanState.isAir()) {
int i = scann(world, scanPos, posList, depth + 1);
if (i < dist)
dist = i;
}
}
return dist;
}
return 8;
}
use of net.minecraft.block.DoorBlock in project MCMOD-Industria by M-Marvin.
the class BlockBurnedSlab method scann.
@SuppressWarnings("deprecation")
public static int scann(World world, BlockPos pos, List<BlockPos> posList, int depth) {
if (depth < 8 && !posList.contains(pos)) {
int dist = 8;
posList.add(pos);
for (Direction d : Direction.values()) {
BlockPos scanPos = pos.relative(d);
BlockState scanState = world.getBlockState(scanPos);
if (BlockBurnedBlock.canHoldBurnedBlocks(world, pos, scanState)) {
return depth + 1;
} else if ((scanState.isSolidRender(world, pos) || scanState.getBlock() instanceof FenceBlock || scanState.getBlock() instanceof TrapDoorBlock || scanState.getBlock() instanceof DoorBlock) && !scanState.isAir()) {
int i = scann(world, scanPos, posList, depth + 1);
if (i < dist)
dist = i;
}
}
return dist;
}
return 8;
}
use of net.minecraft.block.DoorBlock in project MCMOD-Industria by M-Marvin.
the class BlockBurnedStairs method scann.
@SuppressWarnings("deprecation")
public static int scann(World world, BlockPos pos, List<BlockPos> posList, int depth) {
if (depth < 8 && !posList.contains(pos)) {
int dist = 8;
posList.add(pos);
for (Direction d : Direction.values()) {
BlockPos scanPos = pos.relative(d);
BlockState scanState = world.getBlockState(scanPos);
if (BlockBurnedBlock.canHoldBurnedBlocks(world, pos, scanState)) {
return depth + 1;
} else if ((scanState.isSolidRender(world, pos) || scanState.getBlock() instanceof FenceBlock || scanState.getBlock() instanceof TrapDoorBlock || scanState.getBlock() instanceof DoorBlock) && !scanState.isAir()) {
int i = scann(world, scanPos, posList, depth + 1);
if (i < dist)
dist = i;
}
}
return dist;
}
return 8;
}
Aggregations