private Set<EnumFacing> getVisibleFacings(BlockPos pos) {
VisGraph visibility = new VisGraph();
BlockPos cornerPos = new BlockPos(pos.getX() >> 4 << 4, pos.getY() >> 4 << 4, pos.getZ() >> 4 << 4);
Chunk chunk = this.blockSystem.getChunkFromBlockCoords(cornerPos);
for (BlockPos.MutableBlockPos blockPos : BlockPos.getAllInBoxMutable(cornerPos, cornerPos.add(15, 15, 15))) {
if (chunk.getBlockState(blockPos).isOpaqueCube()) {
visibility.setOpaqueCube(blockPos);
}
}
return visibility.getVisibleFacings(pos);
}
BlockSystemRenderer.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:BlockSystems
作者:
评论列表
文章目录