Checks if a block's material is opaque, and that it takes up a full cube
(BlockPos pos, boolean _default)
| 2427 | * Checks if a block's material is opaque, and that it takes up a full cube |
| 2428 | */ |
| 2429 | public boolean isBlockNormalCube(BlockPos pos, boolean _default) |
| 2430 | { |
| 2431 | if (!this.isValid(pos)) |
| 2432 | { |
| 2433 | return _default; |
| 2434 | } |
| 2435 | else |
| 2436 | { |
| 2437 | Chunk chunk = this.chunkProvider.provideChunk(pos); |
| 2438 | |
| 2439 | if (chunk.isEmpty()) |
| 2440 | { |
| 2441 | return _default; |
| 2442 | } |
| 2443 | else |
| 2444 | { |
| 2445 | Block block = this.getBlockState(pos).getBlock(); |
| 2446 | return block.getMaterial().isOpaque() && block.isFullCube(); |
| 2447 | } |
| 2448 | } |
| 2449 | } |
| 2450 | |
| 2451 | /** |
| 2452 | * Called on construction of the World class to setup the initial skylight values |
no test coverage detected