(final BlockPos pos)
| 584 | } |
| 585 | |
| 586 | public IBlockState getBlockState(final BlockPos pos) |
| 587 | { |
| 588 | if (this.worldObj.getWorldType() == WorldType.DEBUG_WORLD) |
| 589 | { |
| 590 | IBlockState iblockstate = null; |
| 591 | |
| 592 | if (pos.getY() == 60) |
| 593 | { |
| 594 | iblockstate = Blocks.barrier.getDefaultState(); |
| 595 | } |
| 596 | |
| 597 | if (pos.getY() == 70) |
| 598 | { |
| 599 | iblockstate = ChunkProviderDebug.func_177461_b(pos.getX(), pos.getZ()); |
| 600 | } |
| 601 | |
| 602 | return iblockstate == null ? Blocks.air.getDefaultState() : iblockstate; |
| 603 | } |
| 604 | else |
| 605 | { |
| 606 | try |
| 607 | { |
| 608 | if (pos.getY() >= 0 && pos.getY() >> 4 < this.storageArrays.length) |
| 609 | { |
| 610 | ExtendedBlockStorage extendedblockstorage = this.storageArrays[pos.getY() >> 4]; |
| 611 | |
| 612 | if (extendedblockstorage != null) |
| 613 | { |
| 614 | int j = pos.getX() & 15; |
| 615 | int k = pos.getY() & 15; |
| 616 | int i = pos.getZ() & 15; |
| 617 | return extendedblockstorage.get(j, k, i); |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | return Blocks.air.getDefaultState(); |
| 622 | } |
| 623 | catch (Throwable throwable) |
| 624 | { |
| 625 | CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Getting block state"); |
| 626 | CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being got"); |
| 627 | crashreportcategory.addCrashSectionCallable("Location", new Callable<String>() |
| 628 | { |
| 629 | public String call() throws Exception |
| 630 | { |
| 631 | return CrashReportCategory.getCoordinateInfo(pos); |
| 632 | } |
| 633 | }); |
| 634 | throw new ReportedException(crashreport); |
| 635 | } |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | /** |
| 640 | * Return the metadata corresponding to the given coordinates inside a chunk. |
no test coverage detected