MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / isBlockNormalCube

Method isBlockNormalCube

src/main/java/net/minecraft/world/World.java:2429–2449  ·  view source on GitHub ↗

Checks if a block's material is opaque, and that it takes up a full cube

(BlockPos pos, boolean _default)

Source from the content-addressed store, hash-verified

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

Callers 1

onLivingUpdateMethod · 0.45

Calls 8

isValidMethod · 0.95
isEmptyMethod · 0.95
getBlockStateMethod · 0.95
getMaterialMethod · 0.95
isFullCubeMethod · 0.95
isOpaqueMethod · 0.80
provideChunkMethod · 0.65
getBlockMethod · 0.65

Tested by

no test coverage detected