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

Method getBlock0

src/main/java/net/minecraft/world/chunk/Chunk.java:521–544  ·  view source on GitHub ↗

Returns the block corresponding to the given coordinates inside a chunk.

(int x, int y, int z)

Source from the content-addressed store, hash-verified

519 * Returns the block corresponding to the given coordinates inside a chunk.
520 */
521 private Block getBlock0(int x, int y, int z)
522 {
523 Block block = Blocks.air;
524
525 if (y >= 0 && y >> 4 < this.storageArrays.length)
526 {
527 ExtendedBlockStorage extendedblockstorage = this.storageArrays[y >> 4];
528
529 if (extendedblockstorage != null)
530 {
531 try
532 {
533 block = extendedblockstorage.getBlockByExtId(x, y & 15, z);
534 }
535 catch (Throwable throwable)
536 {
537 CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Getting block");
538 throw new ReportedException(crashreport);
539 }
540 }
541 }
542
543 return block;
544 }
545
546 public Block getBlock(final int x, final int y, final int z)
547 {

Callers 3

generateHeightMapMethod · 0.95
getBlockLightOpacityMethod · 0.95
getBlockMethod · 0.95

Calls 2

getBlockByExtIdMethod · 0.95
makeCrashReportMethod · 0.95

Tested by

no test coverage detected